@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/baloo2-600.woff2") format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/baloo2-700.woff2") format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/baloo2-800.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/quicksand-500.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/quicksand-600.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/quicksand-700.woff2") format("woff2");
}

:root {
  --ink: #1a2b4a;
  --muted: #4d6280;
  --paper: #fffefb;
  --coral: #ff5a4e;
  --sun: #ffc43a;
  --mint: #1ec8b0;
  --ad-sidebar-width: 160px;
  --sky: #3db8ff;
  --leaf: #2fbf71;
  --peach: #ff8f6b;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(26, 43, 74, 0.08);
  --shadow: 0 14px 36px rgba(26, 43, 74, 0.1);
  --radius: 22px;
  --font-display: "Baloo 2", "Fredoka", "Arial Rounded MT Bold", sans-serif;
  --font-body: "Quicksand", "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background-color: #ffe56a;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 111, 97, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(61, 184, 255, 0.5) 0%, transparent 40%),
    radial-gradient(circle at 78% 82%, rgba(30, 200, 176, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 10% 88%, rgba(255, 90, 130, 0.35) 0%, transparent 40%),
    linear-gradient(160deg, #ffe56a 0%, #ffd4a8 25%, #b8f0ff 55%, #9ff5d8 80%, #ffc4b0 100%);
  background-attachment: scroll;
}

/* Soft playful dots + floating blobs on every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 1.4px, transparent 1.5px);
  background-size: 28px 28px;
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  top: 18%;
  right: -60px;
  background: radial-gradient(circle, rgba(255, 143, 107, 0.35), transparent 70%);
  animation: floatBlob 12s ease-in-out infinite alternate;
  box-shadow:
    -40vw 55vh 0 -40px rgba(61, 184, 255, 0.22),
    -70vw 20vh 0 -70px rgba(255, 196, 58, 0.28),
    -15vw 75vh 0 -50px rgba(30, 200, 176, 0.25);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

/* Ad Sidebar Layout — desktop left/right rails */
.ad-layout {
  display: flex !important;
  align-items: flex-start;
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 12px;
  width: 100%;
  box-sizing: border-box;
}

.ad-sidebar-left,
.ad-sidebar-right {
  width: var(--ad-sidebar-width);
  flex: 0 0 var(--ad-sidebar-width);
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
  z-index: 25;
  align-self: flex-start;
}

.ad-sidebar-left { order: 1; }

.ad-content {
  flex: 1 1 auto;
  min-width: 0;
  order: 2;
  max-width: 100%;
}

.ad-sidebar-right { order: 3; }

.ad-container {
  width: 100%;
  min-height: 250px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed rgba(26, 43, 74, 0.22);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
}
.ad-container.ad-tall { min-height: 600px; }

/* Keep page blocks inside content column so they don't cover rails */
.ad-content .container,
.ad-content .cd-hero,
.ad-content .cd-section,
.ad-content .cd-cat-banner,
.ad-content .wrap,
.ad-content .learn-page,
.ad-content .workbook,
.ad-content .piplo-features,
.ad-content .share-bar,
.ad-content .story-wrap,
.ad-content .activities-hero,
.ad-content .adventure-path,
.ad-content .adventure-hero,
.ad-content .coloring-shell,
.ad-content .coloring-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Hide ad sidebars on mobile/tablet */
@media (max-width: 1200px) {
  .ad-layout { display: block !important; padding: 0; max-width: none; }
  .ad-sidebar-left,
  .ad-sidebar-right { display: none !important; }
  .ad-content { width: 100%; max-width: none; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 254, 251, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(26, 43, 74, 0.04);
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  transition: padding .25s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: font-size .25s ease;
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--coral), var(--sun));
  box-shadow: 0 8px 18px rgba(255, 90, 78, 0.28);
  font-size: 1.4rem;
  animation: bob 3s ease-in-out infinite;
  transition: width .25s ease, height .25s ease, border-radius .25s ease;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a {
  position: relative;
  padding: 6px 10px;
  border-radius: 12px;
  transition: background .15s ease, color .15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  transition: left .2s ease, right .2s ease;
}
.nav-links a:hover {
  color: var(--coral);
  background: rgba(255, 90, 78, 0.08);
}
.nav-links a:hover::after {
  left: 10px;
  right: 10px;
}
.nav-links a[aria-current="page"] {
  color: var(--coral);
  background: rgba(255, 90, 78, 0.1);
}
.nav-links a[aria-current="page"]::after {
  left: 10px;
  right: 10px;
}
body.is-scrolled .site-header {
  background: rgba(255, 254, 251, 0.94);
  border-bottom-color: rgba(26, 43, 74, 0.09);
  box-shadow: 0 10px 30px rgba(26, 43, 74, 0.13);
}
body.is-scrolled .nav { padding: 6px 0; }
body.is-scrolled .brand { font-size: 1.15rem; }
body.is-scrolled .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}
.scroll-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--sky));
  box-shadow: 0 1px 8px rgba(61, 184, 255, 0.4);
  pointer-events: none;
  will-change: transform;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(26, 43, 74, 0.55) 0%, rgba(26, 43, 74, 0.18) 45%, rgba(255, 196, 58, 0.12) 100%),
    url("https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
  transform: scale(1.03);
  animation: slowZoom 20s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(to top, rgba(255, 248, 232, 0.95), transparent);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 680px;
  align-self: end;
  padding: 48px 0 72px;
  animation: riseIn 0.85s ease both;
}
.hero .brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 0.98;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}
.hero .brand-hero span {
  display: inline;
  color: #ffe566;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.hero p {
  margin: 0 0 26px;
  font-size: 1.15rem;
  max-width: 480px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 90, 78, 0.32);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(26, 43, 74, 0.12);
}
.btn-soft {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 2px solid rgba(26, 43, 74, 0.08);
  backdrop-filter: blur(8px);
}

.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  margin: 0;
  letter-spacing: -0.02em;
}
.section-head p { margin: 6px 0 0; color: var(--muted); font-weight: 600; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: riseIn .7s ease both;
}
.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(26, 43, 74, 0.14);
}
.card .emoji {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin-bottom: 12px;
}
.card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.card p { margin: 0; color: var(--muted); font-weight: 600; }
.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 10px;
  background: rgba(30, 200, 176, 0.15);
  color: #0e8f7e;
  margin-bottom: 10px;
}

.band {
  border-radius: 28px;
  padding: 32px;
  background:
    linear-gradient(125deg, rgba(255, 90, 78, 0.95), rgba(255, 196, 58, 0.9) 48%, rgba(30, 200, 176, 0.92));
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  top: -50px;
  right: -30px;
}
.band h2, .band p, .band .btn { position: relative; z-index: 1; }
.band h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.band p { margin: 0 0 18px; color: rgba(255, 255, 255, 0.95); font-weight: 600; max-width: 48ch; }

.page {
  padding: 40px 0 70px;
}
.page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 68ch; font-weight: 600; }

.activity-shell { padding: 28px 0 60px; }
.activity-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(12px);
}
.activity-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.activity-title {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.7rem;
}
.activity-meta { color: var(--muted); font-weight: 700; }
.level-nav {
  margin-top: 16px;
  text-align: center;
}
.level-info {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}
.activity-hint {
  text-align: center;
  color: #5b6b88;
  font-weight: 700;
  margin: 0 0 10px;
}
.activity-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.activity-actions .btn {
  min-width: 140px;
}
.next-level-wrap {
  margin-top: 18px;
  text-align: center;
}
.next-level-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  font-size: 1.1rem;
  padding: 14px 28px;
}
.level-done, .level-locked {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}
.activity-area {
  min-height: 300px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(232, 249, 255, 0.9), rgba(255, 248, 232, 0.95));
  border: 2px dashed rgba(61, 184, 255, 0.35);
  padding: 18px;
}
.feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}
.feedback.show { display: block; }
.feedback.ok { background: #e5f9ee; color: #157a42; }
.feedback.bad { background: #ffe6e2; color: #b42318; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 12px;
}
.item-btn, .drag-item, .drop-zone {
  min-height: 92px;
  border-radius: 18px;
  border: 2px solid rgba(26, 43, 74, 0.08);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.05);
}
.item-btn:hover, .drag-item:hover { transform: scale(1.05); }
.item-btn.selected { border-color: var(--mint); background: #eafaf7; }
.item-btn.correct { border-color: var(--leaf); background: #e8f8ee; }
.item-btn.wrong { border-color: var(--coral); background: #ffe8e4; }
.drop-zone {
  font-size: 1rem;
  color: var(--muted);
  border-style: dashed;
  font-weight: 700;
}
.drop-zone.filled { border-style: solid; border-color: var(--mint); color: var(--ink); }

.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.item-btn.has-photo,
.drag-item.has-photo,
.drop-zone.filled {
  padding: 8px;
  gap: 6px;
  font-size: 0.95rem;
}
.item-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  pointer-events: none;
  border: 1.5px solid rgba(26, 43, 74, 0.18);
  background: #fff;
  box-sizing: border-box;
}
.item-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.item-emoji {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8e7, #e7f7ff);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1;
}
.item-btn.has-emoji {
  gap: 0;
}
.circle-clue {
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #1f5f98;
  margin: 0 0 14px;
}
.home-subject {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(560px, 100%);
  margin: 0 auto 16px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 3px solid rgba(76, 201, 240, 0.45);
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.95), transparent 30%),
    linear-gradient(135deg, #e8fff6, #e8f4ff 55%, #fff3d0);
  box-shadow: 0 10px 22px rgba(26, 43, 74, 0.1);
  text-align: left;
}
.home-subject-photo .item-photo,
.home-subject-photo img {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.12);
}
.home-subject-photo .subject-emoji {
  font-size: 3.4rem;
  line-height: 1;
}
.home-subject-tag {
  display: inline-block;
  margin-bottom: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: #2a6f97;
  font-size: 0.75rem;
  font-weight: 800;
}
.home-subject-copy strong {
  display: block;
  font-size: 1.2rem;
  color: #1a2b4a;
}
.home-subject-copy p {
  margin: 4px 0 0;
  color: #35507a;
  font-weight: 700;
  line-height: 1.35;
}
@media (max-width: 520px) {
  .home-subject { gap: 10px; padding: 10px; }
  .home-subject-photo .item-photo,
  .home-subject-photo img { width: 72px; height: 72px; border-radius: 14px; }
  .home-subject-copy strong { font-size: 1.05rem; }
  .home-subject-copy p { font-size: 0.92rem; }
}
.item-btn.face-down {
  background: linear-gradient(145deg, #3db8ff, #ff8f6b 55%, #ffc43a);
  border-color: #fff;
}
.card-back {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.count-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.count-photos .item-photo {
  width: 72px;
  height: 72px;
}
.visual-add-board {
  display: grid;
  gap: 16px;
  margin: 8px 0 18px;
}
.visual-add-problem {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 42px minmax(140px, 1fr) 42px 64px;
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(26, 43, 74, 0.08);
}
.visual-add-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 250px;
  justify-content: center;
}
.visual-add-group .item-photo {
  width: 68px;
  height: 68px;
}
.visual-add-op {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
}
.visual-add-op.plus { background: #ff6b9d; }
.visual-add-op.equals { background: #7b6cff; }
.visual-add-drop {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 3px dashed #ff8fb8;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #9aa3b5;
}
.visual-add-drop.filled { border-style: solid; color: var(--ink); }
.visual-add-drop.correct { border-color: var(--leaf); background: #e8f8ee; }
.visual-add-drop.wrong { border-color: var(--coral); background: #ffe8e4; }
.visual-add-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(26, 43, 74, 0.08);
}
.visual-add-chip {
  min-width: 58px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #ffe7c2);
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.12);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink);
  cursor: grab;
}
.visual-add-chip.is-picked {
  outline: 3px solid #3db8ff;
  transform: scale(1.06);
}
.visual-add-drop:not(.filled) {
  justify-items: start;
  padding-left: 17px;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .visual-add-problem {
    grid-template-columns: minmax(92px, 1fr) 34px minmax(92px, 1fr) 34px 54px;
    gap: 6px;
    padding: 9px;
  }
  .visual-add-group { max-width: 104px; gap: 4px; }
  .visual-add-group .item-photo { width: 46px; height: 46px; }
  .visual-add-op { width: 34px; height: 34px; font-size: 1.15rem; }
  .visual-add-drop { width: 54px; height: 54px; }
  .visual-add-drop:not(.filled) { padding-left: 14px; }
}
.spell-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.spell-photo-wrap .item-photo {
  width: min(220px, 70vw);
  height: min(220px, 70vw);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(26, 43, 74, 0.1);
}
.shadow-photo {
  object-fit: contain;
  background: #f4f7fb;
  padding: 10px;
}
.shadow-photo.is-css-silhouette {
  /* Avoid solid black boxes on white-background JPGs; prefer PNG/canvas silhouettes */
  filter: none;
  opacity: 1;
}
.shadow-photo.is-canvas-silhouette {
  filter: none;
  opacity: 1;
  background: transparent;
  padding: 4px;
}
.card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 10px;
  display: block;
  border: 1.5px solid rgba(26, 43, 74, 0.18);
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.1);
}
.card-photo {
  padding: 14px;
  overflow: visible;
}
.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
}
.card-cover-wrap {
  position: relative;
  width: 92%;
  aspect-ratio: 4 / 3;
  padding: 12px;
  margin: 0 auto 8px;
  box-sizing: border-box;
  flex: 0 0 auto;
  transform: scale(var(--scroll-scale, 1));
  transform-origin: center;
  will-change: transform;
  background: #fff;
  border-radius: 18px;
  border: 2px solid rgba(26, 43, 74, 0.12);
}
.card-cover-wrap::before {
  content: none;
}
.card-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  margin-bottom: 0;
  display: block;
  border: none;
  background: #fff;
  box-shadow: none;
  box-sizing: border-box;
  padding: 6px;
}
.card-cover-fallback {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ffc43a, #ff5a4e);
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(26, 43, 74, 0.16);
  box-shadow:
    0 2px 0 rgba(26, 43, 74, 0.06),
    0 7px 14px rgba(26, 43, 74, 0.1);
  border-radius: 16px;
}
.card-number {
  position: static;
  z-index: 1;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  color: #1a2b4a;
  background: #fff;
  border: 1.5px solid rgba(26, 43, 74, 0.16);
  box-shadow: 0 3px 8px rgba(26, 43, 74, 0.08);
  pointer-events: none;
}
.card-number-preview {
  font-size: 0.72rem;
  min-width: auto;
  padding: 0 10px;
  /* Keep preview numbering boxes same white as live cards */
  background: #fff;
  color: #1a2b4a;
  border: 1.5px solid rgba(26, 43, 74, 0.16);
}
.card-type {
  position: static;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a2b4a;
  background: #fff;
  border: 1.5px solid rgba(26, 43, 74, 0.14);
  box-shadow: 0 3px 8px rgba(26, 43, 74, 0.08);
  pointer-events: none;
  white-space: nowrap;
}
.card.card-photo {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  background: #fffaf1;
  box-shadow:
    0 0 0 3px rgba(26, 43, 74, 0.1),
    0 0 0 6px rgba(255, 255, 255, 0.72),
    0 10px 0 rgba(26, 43, 74, 0.1),
    0 16px 24px rgba(26, 43, 74, 0.12);
  backdrop-filter: none;
  content-visibility: auto;
  contain-intrinsic-size: 260px 260px;
}
.card.card-photo::before,
.card.card-photo::after {
  content: none;
}
.card.card-photo::before {
  width: 150px;
  height: 150px;
  right: -48px;
  bottom: -48px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.2) 0 22%, transparent 23%),
    repeating-radial-gradient(circle, rgba(61,184,255,.28) 0 5px, transparent 6px 13px);
}
.card.card-photo::after {
  width: 96px;
  height: 96px;
  left: -28px;
  bottom: 42px;
  background:
    repeating-linear-gradient(45deg, rgba(255,196,58,.28) 0 7px, transparent 7px 15px);
}
.card.card-photo > * {
  position: relative;
  z-index: 1;
}
.card.card-photo[data-category="Animals"]::before { filter: hue-rotate(8deg); }
.card.card-photo[data-category="Food"]::before { filter: hue-rotate(115deg); }
.card.card-photo[data-category="Numbers"]::before { filter: hue-rotate(195deg); }
.card.card-photo[data-category="Words"]::before { filter: hue-rotate(245deg); }
.card.card-photo[data-category="Nature"]::before { filter: hue-rotate(70deg); }
.card.card-photo[data-category="Shapes"]::before { filter: hue-rotate(285deg); }
.card.card-photo .tag,
.card.card-photo h3,
.card.card-photo p {
  position: relative;
  z-index: 2;
}
.card.card-photo h3 {
  font-size: 0.98rem;
  line-height: 1.2;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card.card-photo .tag {
  align-self: flex-start;
  margin-bottom: 5px;
  padding: 4px 9px;
  font-size: 0.7rem;
}
.card.card-photo p {
  font-size: 0.8rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.filter-bar {
  display: none !important; /* client: hide public game-type filter total/cloud */
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}
.filter-chip {
  border: 1.5px solid rgba(26, 43, 74, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: #1a2b4a;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.filter-chip:hover { transform: translateY(-2px); }
.filter-chip.active {
  background: #1a2b4a;
  color: #fff;
  border-color: #1a2b4a;
}
.activities-hero {
  border-radius: 28px;
  padding: 22px 22px 8px;
  margin-bottom: 8px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 159, 122, 0.45), transparent 42%),
    radial-gradient(circle at 90% 10%, rgba(90, 208, 255, 0.4), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(255, 248, 232, 0.9));
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.activities-hero h1 { margin-bottom: 6px; }
.home-featured-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 2px solid rgba(26, 43, 74, 0.18);
  box-shadow: 0 5px 14px rgba(26, 43, 74, 0.1);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}
body[data-page="home"] .section-head > .btn {
  border: 2px solid rgba(26, 43, 74, 0.2);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(26, 43, 74, 0.12);
}
body[data-page="home"] .card-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
body[data-page="activities-list"] .card-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
body[data-page="activities-list"] {
  background: #ffffff;
  background-attachment: scroll;
}
body[data-page="activity"],
body[data-page="coloring-list"],
body[data-page="coloring"] {
  background: #ffffff;
}

/* Confetti / FX */
#fx-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}
.candy {
  position: absolute;
  top: -40px;
  font-size: 1.6rem;
  animation: fall linear forwards;
  z-index: 10000;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .15; }
}
.paper-piece {
  position: absolute;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  z-index: 10001;
  animation: popOut ease-out forwards;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}
.paper-piece.sq { width: 12px; height: 12px; border-radius: 2px; }
.paper-piece.ribbon { width: 6px; height: 22px; border-radius: 3px; }
@keyframes popOut {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 180px)) rotate(var(--rot)); opacity: 0; }
}
.party-bang {
  position: fixed;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -50%) scale(.4);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  font-family: var(--font-display);
  color: #ff1f7a;
  text-shadow: 0 4px 0 #ffe066, 0 8px 20px rgba(0, 0, 0, .15);
  animation: bangIn .9s ease forwards;
  z-index: 10002;
}
@keyframes bangIn {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(1); opacity: 0; }
}
body.wrong-flash {
  animation: wrongFlash .35s ease;
}
@keyframes wrongFlash {
  0%, 100% { filter: none; }
  40% { filter: sepia(0.4) saturate(2) hue-rotate(-20deg); }
}

.spelling-input {
  width: min(340px, 100%);
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(61, 184, 255, 0.35);
  font-size: 1.1rem;
  font-weight: 700;
  background: #fff;
}

/* Game 11 — write the English number name */
body[data-activity-id="11"] .activity-area {
  display: grid;
  place-items: center;
  padding: 18px;
}
.nn-game {
  width: min(620px, 100%);
  text-align: center;
}
.nn-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.nn-badge {
  padding: 7px 12px;
  border: 2px solid rgba(76, 201, 240, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #245d87;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.08);
}
.nn-sticker {
  position: relative;
  width: min(330px, 84vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 14px;
  padding: 9px;
  border-radius: 38px;
  background: conic-gradient(from 40deg,
    #ff5d9e, #ffd43b, #4dabf7, #b197fc, #69db7c, #ff922b, #ff5d9e);
  box-shadow: 0 18px 34px rgba(26, 43, 74, 0.18);
}
.nn-sticker::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  border-radius: 33px;
  pointer-events: none;
  z-index: 3;
}
.nn-sticker-inner {
  position: relative;
  height: 100%;
  border-radius: 30px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.nn-number {
  color: var(--nn-color, #ff4d94);
  font-family: var(--font-display);
  font-size: clamp(6rem, 26vw, 10rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 6px #ffffff;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.05), 0 12px 22px rgba(26, 43, 74, 0.2);
  z-index: 2;
}
.nn-number.is-2 { font-size: clamp(5rem, 22vw, 8.5rem); }
.nn-number.is-3 {
  font-size: clamp(3.6rem, 17vw, 6.4rem);
  -webkit-text-stroke-width: 5px;
}
.nn-question {
  margin: 0 0 14px;
  color: #2a3154;
  font-weight: 800;
  font-size: 1.05rem;
}
.nn-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
  animation: nnFloat 2.4s ease-in-out infinite;
}
.nn-d1 { top: 12%; left: 12%; color: #ffd43b; font-size: 1.5rem; }
.nn-d2 { top: 16%; right: 16%; color: #ff5d9e; font-size: 0.9rem; animation-delay: -0.6s; }
.nn-d3 { bottom: 16%; left: 15%; color: #4dabf7; font-size: 1.3rem; animation-delay: -1.1s; }
.nn-d4 { bottom: 14%; right: 14%; color: #69db7c; font-size: 1rem; animation-delay: -0.3s; }
.nn-d5 { top: 46%; right: 8%; color: #b197fc; font-size: 1.1rem; animation-delay: -1.4s; }
.nn-d6 { top: 48%; left: 8%; color: #ff922b; font-size: 0.85rem; animation-delay: -0.9s; }
.nn-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 2px dashed rgba(117, 76, 224, 0.3);
  border-radius: 14px;
  background: #f6f1ff;
  color: #6246b5;
}
.nn-hint span { font-size: .82rem; font-weight: 700; }
.nn-hint strong { letter-spacing: .16em; font-size: 1.08rem; }
.nn-hint-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.nn-hint-btn {
  padding: 8px 18px;
  border: 2px solid rgba(255, 183, 3, 0.55);
  border-radius: 999px;
  background: #fff7e6;
  color: #b26a00;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(178, 106, 0, 0.14);
  transition: transform 0.15s ease, background 0.2s ease;
}
.nn-hint-btn:hover { transform: translateY(-2px); }
.nn-hint-btn.is-active { background: #ffe9b0; }
.nn-hint.is-hidden { display: none; }
.nn-label {
  display: block;
  margin-bottom: 7px;
  color: #2a3154;
  font-weight: 800;
}
.nn-answer-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
}
.nn-input {
  min-width: 0;
  text-align: center;
  font-size: 1.2rem;
}
.nn-input.is-correct { border-color: #06d6a0; background: #e8fff4; }
.nn-input.is-wrong { border-color: #ff5d8f; animation: lmShake .4s ease; }
@keyframes nnFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-7px) rotate(8deg); }
}
@media (max-width: 520px) {
  .nn-answer-row { flex-direction: column; }
  .nn-answer-row .btn { width: 100%; }
}

/* Game 25 — near or far */
.nf-game { width: min(600px, 100%); margin: 0 auto; text-align: center; }
.nf-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 auto 16px;
  box-shadow: 0 14px 28px rgba(26, 43, 74, 0.16), inset 0 0 0 4px rgba(255, 255, 255, 0.55);
}
.nf-sun { position: absolute; top: 8%; left: 8%; font-size: clamp(1.6rem, 6vw, 2.6rem); }
.nf-cloud { position: absolute; font-size: clamp(1.4rem, 5vw, 2.2rem); opacity: 0.9; animation: nfDrift 9s ease-in-out infinite; }
.nf-cloud-a { top: 12%; right: 22%; }
.nf-cloud-b { top: 26%; right: 46%; animation-delay: -4s; font-size: clamp(1rem, 4vw, 1.6rem); }
@keyframes nfDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-14px); }
}
.nf-ref {
  position: absolute;
  left: 12%;
  bottom: 5%;
  font-size: clamp(3.4rem, 15vw, 6rem);
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.18));
}
.nf-subject {
  position: absolute;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.18));
  transition: all 0.4s ease;
}
/* near = big and close to the reference (foreground) */
.nf-subject.nf-near { right: 16%; bottom: 5%; font-size: clamp(3.4rem, 15vw, 6rem); }
/* far = small and pushed into the background */
.nf-subject.nf-far { right: 24%; top: 16%; font-size: clamp(1.3rem, 5.5vw, 2.1rem); }
.nf-subject.nf-left.nf-near { left: 16%; right: auto; }
.nf-subject.nf-left.nf-far { left: 24%; right: auto; }
.nf-question {
  font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  font-weight: 800;
  color: #2a3154;
  margin: 0 0 14px;
}
.nf-question b { color: #e6447f; }
.nf-blank {
  display: inline-block;
  min-width: 84px;
  border-bottom: 3px dashed #4dabf7;
  color: #12b886;
  font-weight: 900;
  letter-spacing: 1px;
}
.nf-choices { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.nf-choice {
  min-width: 130px;
  padding: 14px 22px;
  border: 3px solid rgba(76, 201, 240, 0.4);
  border-radius: 18px;
  background: #fff;
  color: #245d87;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.12);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.nf-choice:hover { transform: translateY(-2px); }
.nf-choice.is-right { background: #e8fff4; border-color: #06d6a0; color: #067a56; }
.nf-choice.is-wrong { background: #ffe9f0; border-color: #ff5d8f; animation: lmShake 0.4s ease; }
@media (max-width: 520px) {
  .nf-choice { min-width: 42%; }
}

/* Game 20 — number trail (follow odd/even numbers) */
.nt {
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}
.nt-title {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #d6336c;
  margin: 2px 0 18px;
}
.nt-board { position: relative; touch-action: none; }
.nt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}
.nt-line { stroke: #f03e6e; stroke-width: 4; stroke-linecap: round; }
.nt-grid {
  display: grid;
  gap: clamp(6px, 2.2vw, 14px);
  position: relative;
  z-index: 2;
}
.nt-board.nt-shake { animation: lmShake 0.4s ease; }
.nt-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid #ffd0e0;
  background: #fff;
  color: #6741d9;
  font-size: clamp(0.95rem, 4vw, 1.5rem);
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  padding: 0;
}
.nt-cell:hover { transform: scale(1.05); }
.nt-cell.is-on {
  background: linear-gradient(150deg, #ffa8c9, #f783ac);
  border-color: #e64980;
  color: #fff;
  box-shadow: 0 4px 10px rgba(230, 73, 128, 0.4);
}
.nt-cell.is-start { border-color: #ffd43b; }
.nt-cell.is-end { border-color: #74c0fc; }
.nt-icon {
  position: absolute;
  font-size: 1.4rem;
  z-index: 5;
  pointer-events: none;
}
.nt-start-icon { top: -14px; left: -14px; transform: rotate(-10deg); }
.nt-end-icon { bottom: -14px; right: -14px; }
.nt-val { position: relative; z-index: 1; }

/* Game 20 — odd number trail */
.ot {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: center;
}
.ot-title {
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #d6336c;
  margin: 2px 0 6px;
  line-height: 1.25;
}
.ot-hint {
  font-size: clamp(0.88rem, 3.2vw, 1rem);
  color: #7048e8;
  background: #fff8dd;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 0 auto 16px;
  max-width: 94%;
  font-weight: 600;
}
.ot-board {
  position: relative;
  touch-action: none;
  user-select: none;
  padding: 6px;
}
.ot-svg {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}
.ot-line { stroke: #e64980; stroke-width: 4; stroke-linecap: round; }
.ot-board { max-width: min(430px, 100%); margin: 0 auto; }
.ot-grid {
  display: grid;
  gap: clamp(5px, 1.8vw, 11px);
}
.ot-cell {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ffc9de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.8rem, 3.6vw, 1.25rem);
  font-weight: 900;
  color: #6741d9;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.ot-cell.is-on {
  background: linear-gradient(150deg, #ffa8cc, #f76ba3);
  border-color: #e64980;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(230, 73, 128, 0.4);
}
.ot-start, .ot-end { background: #fff3bf; border-color: #ffd43b; cursor: default; }
.ot-start.is-on, .ot-end.is-on { background: #ffe8a3; }
.ot-emoji { font-size: clamp(1.1rem, 4.8vw, 1.7rem); }
.ot-board.ot-shake { animation: lmShake 0.45s ease; }
.ot-reset {
  margin-top: 16px;
  border: none;
  border-radius: 16px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #b197fc, #7048e8);
  box-shadow: 0 5px 12px rgba(112, 72, 229, 0.4);
  cursor: pointer;
}
.ot-reset:hover { transform: translateY(-2px); }

/* Game 21 — where does it come from? (big option cards, card 56 style) */
.ap { width: min(680px, 100%); margin: 0 auto; text-align: center; }
.ap-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: #fff7e0;
  border: 2px solid #ffe08a;
  border-radius: 16px;
  padding: 10px 16px;
  margin: 0 auto 16px;
  max-width: 92%;
  color: #7a4b00;
  font-weight: 800;
  font-size: clamp(0.95rem, 3.4vw, 1.1rem);
}
.ap-ic { font-size: 1.3rem; }
.ap-panel {
  display: flex;
  align-items: center;
  gap: clamp(12px, 4vw, 26px);
  flex-wrap: wrap;
  justify-content: center;
  background: #fff;
  border: 3px solid #ffd0e0;
  border-radius: 20px;
  padding: clamp(14px, 4vw, 22px);
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.ap-animal {
  flex: 0 0 auto;
  width: clamp(120px, 34vw, 180px);
  height: clamp(120px, 34vw, 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eefbff, #e7f0ff);
  border-radius: 18px;
}
.ap-animal-emoji { font-size: clamp(4rem, 20vw, 6.5rem); line-height: 1; }
.ap-animal-img { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
.ap-sentence {
  flex: 1 1 220px;
  min-width: 200px;
  text-align: left;
  font-size: clamp(1rem, 3.8vw, 1.35rem);
  font-weight: 700;
  color: #3a3a55;
  line-height: 1.7;
  margin: 0;
}
.ap-blank {
  display: inline-block;
  min-width: 120px;
  border-bottom: 3px solid #333;
  margin: 0 4px;
}
.ap-choose {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: #5f3dc4;
  font-weight: 800;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  margin: 0 0 14px;
}
.ap-options {
  display: flex;
  gap: clamp(12px, 3.5vw, 22px);
  justify-content: center;
  flex-wrap: wrap;
}
.ap-opt {
  flex: 1 1 150px;
  max-width: 200px;
  min-width: 140px;
  border: 3px solid transparent;
  border-radius: 20px;
  padding: clamp(16px, 4vw, 26px) 10px clamp(12px, 3vw, 18px);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ap-opt:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12); }
.ap-opt-pic { font-size: clamp(3.4rem, 16vw, 5.2rem); line-height: 1; }
.ap-opt-label {
  font-size: clamp(1.2rem, 5vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.5px;
}
.ap-c0 { background: #eef8e2; border-color: #cfe8b0; }
.ap-c0 .ap-opt-label { color: #4b8b2b; }
.ap-c1 { background: #e2edfb; border-color: #b9d2f2; }
.ap-c1 .ap-opt-label { color: #2b6cb0; }
.ap-c2 { background: #fdf1d8; border-color: #f2d9a6; }
.ap-c2 .ap-opt-label { color: #a15c1e; }
.ap-opt.is-right {
  border-color: #37b24d;
  box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.35), 0 10px 22px rgba(55, 178, 77, 0.25);
  transform: translateY(-4px) scale(1.03);
}
.ap-opt.is-wrong {
  border-color: #ff6b6b;
  animation: lmShake 0.5s ease;
}
@media (max-width: 520px) {
  .ap-sentence { text-align: center; }
}

/* Game 27 — choose items found at a place */
.pl-game { width: min(680px, 100%); margin: 0 auto; text-align: center; }
.pl-q {
  font-weight: 800;
  color: #234a8a;
  font-size: clamp(1rem, 3.8vw, 1.35rem);
  margin: 0 0 14px;
}
.pl-card {
  border: 4px solid #a9c7f2;
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto 18px;
  width: min(560px, 96%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.pl-banner {
  background: #2a2b6b;
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 4.4vw, 1.6rem);
  text-align: right;
  padding: 8px 18px;
  letter-spacing: 0.5px;
}
.pl-scene {
  position: relative;
  height: clamp(150px, 32vw, 230px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pl-place-emoji {
  font-size: clamp(4rem, 22vw, 8rem);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  z-index: 2;
}
.pl-cloud { position: absolute; font-size: clamp(1.6rem, 7vw, 2.6rem); opacity: 0.95; z-index: 1; }
.pl-cloud-a { top: 12%; left: 10%; }
.pl-cloud-b { top: 8%; right: 12%; }
.pl-progress {
  font-weight: 800;
  color: #6a3ea0;
  font-size: clamp(0.9rem, 3.4vw, 1.1rem);
  margin: 0 0 14px;
}
.pl-progress b { color: #d6336c; }
.pl-options {
  display: flex;
  gap: clamp(10px, 3vw, 20px);
  justify-content: center;
  flex-wrap: wrap;
}
.pl-opt {
  position: relative;
  flex: 0 1 150px;
  min-width: 110px;
  max-width: 170px;
  background: #fff;
  border: 3px solid #e7edf6;
  border-radius: 18px;
  padding: 26px 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pl-opt:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.pl-tick {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2b9bf4;
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease;
}
.pl-tick::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}
.pl-pic { font-size: clamp(2.8rem, 13vw, 4.2rem); line-height: 1; }
.pl-img { width: clamp(64px, 20vw, 100px); height: clamp(64px, 20vw, 100px); object-fit: contain; }
.pl-label { font-weight: 800; color: #3a4a63; font-size: clamp(0.85rem, 3.2vw, 1.05rem); }
.pl-opt.is-found {
  border-color: #37b24d;
  background: #e7fbea;
  box-shadow: 0 0 0 3px rgba(55, 178, 77, 0.3);
}
.pl-opt.is-found .pl-tick { background: #2fa347; }
.pl-opt.is-found .pl-tick::after { transform: rotate(45deg) scale(1); }
.pl-opt.is-wrong { border-color: #ff6b6b; background: #ffe6e6; animation: lmShake 0.5s ease; }

/* Game 26 — picture sudoku 4x4 */
.sk-game { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.sk-title {
  font-weight: 800;
  color: #5f3dc4;
  font-size: clamp(0.95rem, 3.4vw, 1.2rem);
  margin: 0 0 14px;
}
.sk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: min(420px, 92vw);
  margin: 0 auto 16px;
  background: #b48ee8;
  border: 4px solid #b48ee8;
  border-radius: 16px;
  overflow: hidden;
}
.sk-cell {
  aspect-ratio: 1 / 1;
  background: #fbf7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #e5d8f7;
  user-select: none;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.sk-cell.sk-bl { border-left: 3px solid #9a6fdc; }
.sk-cell.sk-bt { border-top: 3px solid #9a6fdc; }
.sk-cell.sk-br { border-right: 3px solid #9a6fdc; }
.sk-cell.sk-bb { border-bottom: 3px solid #9a6fdc; }
.sk-cell.sk-given { background: #efe7fb; cursor: default; }
.sk-cell.is-selected { box-shadow: inset 0 0 0 3px #f4a0c8; background: #fff0f7; }
.sk-cell.sk-filled { background: #eefaf0; }
.sk-em { font-size: clamp(1.7rem, 9vw, 2.6rem); line-height: 1; }
.sk-img { width: 78%; height: 78%; object-fit: contain; }
.sk-tray {
  display: flex;
  gap: clamp(8px, 3vw, 16px);
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 14px;
}
.sk-chip {
  position: relative;
  width: clamp(56px, 16vw, 78px);
  height: clamp(56px, 16vw, 78px);
  background: #fff;
  border: 3px solid #eadff8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.sk-chip .sk-em { font-size: clamp(1.6rem, 8vw, 2.3rem); }
.sk-chip.is-picked { border-color: #f4538a; transform: translateY(-4px) scale(1.05); }
.sk-chip.is-empty { opacity: 0.4; }
.sk-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 11px;
  background: #7a4bd0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 5px;
}
.sk-ghost {
  position: fixed;
  transform: translate(-50%, -50%) scale(1.2);
  pointer-events: none;
  z-index: 9999;
  font-size: 2.4rem;
}
.sk-ghost .sk-img { width: 56px; height: 56px; }
.sk-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sk-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: clamp(0.85rem, 3vw, 1rem);
  cursor: pointer;
  color: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.sk-undo { background: #f6a821; }
.sk-erase { background: #9366cf; }
.sk-hint { background: #37b24d; }
.sk-check { background: #f4538a; }
.sk-btn:active { transform: translateY(2px); box-shadow: none; }
.sk-hint-n {
  display: inline-block;
  min-width: 18px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 2px;
}

/* Game 25 — prepositions (card 82 style: scene + sentence + choices) */
.pr-game { width: min(760px, 100%); margin: 0 auto; text-align: center; }
.pr-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff7e0;
  border: 2px solid #ffe08a;
  border-radius: 16px;
  padding: 8px 16px;
  margin: 0 auto 14px;
  color: #6a5300;
  font-weight: 800;
  font-size: clamp(0.85rem, 3vw, 1.02rem);
}
.pr-scene {
  position: relative;
  width: 100%;
  height: clamp(200px, 42vw, 300px);
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid #cdeeba;
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.08);
}
.pr-sun {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
}
.pr-cloud {
  position: absolute;
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  opacity: 0.95;
}
.pr-cloud-a { top: 14%; left: 12%; }
.pr-cloud-b { top: 8%; left: 55%; }
.pr-ref,
.pr-subject {
  position: absolute;
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  line-height: 1;
  transform-origin: bottom center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25));
}
.pr-sentence {
  margin: 16px auto 6px;
  background: #fff;
  border: 3px solid #eef1f5;
  border-radius: 18px;
  padding: 14px 18px;
}
.pr-line {
  margin: 0;
  font-size: clamp(1.2rem, 5vw, 1.9rem);
  font-weight: 900;
  color: #2f3b2a;
}
.pr-blank {
  display: inline-block;
  min-width: 84px;
  border-bottom: 3px solid #7fb04f;
  color: #4c8a1f;
  font-weight: 900;
}
.pr-choicehint {
  margin: 6px 0 0;
  color: #b23a86;
  font-weight: 800;
  font-size: clamp(0.95rem, 4vw, 1.2rem);
}
.pr-choose {
  display: inline-block;
  background: #7fb04f;
  color: #fff;
  font-weight: 800;
  border-radius: 14px;
  padding: 6px 18px;
  margin: 14px auto 12px;
  font-size: clamp(0.85rem, 3vw, 1rem);
}
.pr-choices {
  display: flex;
  gap: clamp(12px, 4vw, 26px);
  justify-content: center;
  flex-wrap: wrap;
}
.pr-choice {
  flex: 1 1 180px;
  max-width: 300px;
  min-width: 130px;
  border: 3px solid #d7e8c6;
  border-radius: 16px;
  background: #eef7e4;
  color: #3c6a1d;
  font-size: clamp(1.1rem, 4.6vw, 1.6rem);
  font-weight: 900;
  padding: 14px 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pr-ch1 { background: #f3eafb; border-color: #e0cff5; color: #6a3ea0; }
.pr-ch2 { background: #e7f1fb; border-color: #cfe0f7; color: #345f96; }
.pr-choice:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12); }
.pr-choice.is-right {
  border-color: #37b24d;
  background: #d3f9d8;
  color: #217a33;
  box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.3);
}
.pr-choice.is-wrong { border-color: #ff6b6b; background: #ffe3e3; animation: lmShake 0.5s ease; }

/* Game 24 — choose by characteristic (card 3 style, big cartoon cards) */
.ch { width: min(760px, 100%); margin: 0 auto; text-align: center; }
.ch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}
.ch-badge {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  line-height: 42px;
  border-radius: 50%;
  background: #f4538a;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(244, 83, 138, 0.4);
}
.ch-question {
  margin: 0;
  font-size: clamp(1.15rem, 4.6vw, 1.7rem);
  font-weight: 900;
  color: #5f3dc4;
}
.ch-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff7e0;
  border: 2px solid #ffe08a;
  border-radius: 16px;
  padding: 8px 16px;
  margin: 0 auto 18px;
  color: #7a4b00;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.1vw, 1.02rem);
}
.ch-hint-ic { font-size: 1.2rem; }
.ch-options {
  display: flex;
  gap: clamp(12px, 3.5vw, 24px);
  justify-content: center;
  flex-wrap: wrap;
}
.ch-opt {
  flex: 1 1 180px;
  max-width: 230px;
  min-width: 150px;
  border: 4px solid #eef1f5;
  border-radius: 22px;
  background: #fff;
  padding: clamp(10px, 3vw, 16px);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ch-opt:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12); }
.ch-pic {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fbfcfe;
}
.ch-img { width: 100%; height: 100%; object-fit: contain; }
.ch-emoji { font-size: clamp(3.4rem, 16vw, 5.4rem); }
.ch-label {
  width: 100%;
  border-radius: 14px;
  padding: 8px 6px;
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #fff;
}
.ch-c0 { border-color: #cfe0f7; }
.ch-c0 .ch-label { background: #4c8fd6; }
.ch-c1 { border-color: #cdeeba; }
.ch-c1 .ch-label { background: #5aa832; }
.ch-c2 { border-color: #e0cff5; }
.ch-c2 .ch-label { background: #9366cf; }
.ch-opt.is-right {
  border-color: #37b24d;
  box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.35), 0 12px 24px rgba(55, 178, 77, 0.25);
  transform: translateY(-4px) scale(1.03);
}
.ch-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.5s ease; }

/* Games 44-55 shared new renderers */
/* math-input (44 measure, 46 place value, 53 multiply) */
.mi { width: min(620px, 100%); margin: 0 auto; text-align: center; }
.mi-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #1c7ed6; margin: 0 0 6px; }
.mi-sub { color: #7048e8; font-weight: 700; margin: 0 0 16px; }
.mi-rows { display: flex; flex-direction: column; gap: 12px; margin: 0 auto 20px; max-width: 470px; }
.mi-row {
  display: grid;
  grid-template-columns: 26px minmax(90px, 1fr) 22px 78px 52px;
  align-items: center;
  gap: 10px;
  background: #f4fbe9; border: 3px solid #d3ecb0; border-radius: 14px; padding: 12px 14px;
}
.mi-emoji { font-size: 1.6rem; text-align: center; }
.mi-expr { font-size: clamp(1rem, 4.2vw, 1.4rem); font-weight: 800; color: #2b3a67; text-align: right; white-space: nowrap; }
.mi-eq { font-size: 1.4rem; font-weight: 900; color: #495057; text-align: center; }
.mi-input {
  width: 78px; height: 46px; border: 3px solid #b2f2bb; border-radius: 10px;
  text-align: center; font-size: 1.3rem; font-weight: 900; color: #2b3a67; background: #fff;
}
.mi-input:focus { border-color: #37b24d; box-shadow: 0 0 0 3px rgba(55, 178, 77, 0.25); outline: none; }
.mi-unit { font-weight: 800; color: #495057; text-align: left; white-space: nowrap; }
.mi-row.is-right { border-color: #37b24d; background: #ebfbee; }
.mi-row.is-wrong { border-color: #ff6b6b; background: #fff5f5; animation: lmShake 0.4s ease; }
.mi-check, .wb-check {
  border: none; border-radius: 14px; padding: 11px 30px; font-size: 1.05rem; font-weight: 800;
  color: #fff; background: linear-gradient(180deg, #4dabf7, #1c7ed6); cursor: pointer;
  box-shadow: 0 4px 10px rgba(28, 126, 214, 0.35);
}

/* tap-all (45 eat, 54 multiples, 55 letters) */
.ta { width: min(680px, 100%); margin: 0 auto; text-align: center; }
.ta-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #e8590c; margin: 0 0 6px; }
.ta-progress { color: #495057; font-weight: 700; margin: 0 0 16px; }
.ta-progress b { color: #2f9e44; }
.ta-board { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 3vw, 18px); }
.ta-chip {
  border: 3px solid #ffe0b2; background: #fff; border-radius: 16px; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.ta-chip:hover:not(:disabled) { transform: translateY(-2px); }
.ta-chip:disabled { opacity: 0.4; cursor: default; }
.ta-chip.is-on { border-color: #37b24d; box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.35); background: #ebfbee; }
.ta-chip.is-bad { border-color: #ff6b6b; animation: lmShake 0.4s ease; }
.ta-emoji .ta-chip { font-size: clamp(2.4rem, 12vw, 3.4rem); width: clamp(70px, 20vw, 92px); height: clamp(70px, 20vw, 92px); line-height: 1; }
.ta-letter .ta-board { gap: clamp(8px, 2.6vw, 14px); }
.ta-letter .ta-chip {
  font-size: clamp(1.4rem, 7vw, 2.1rem);
  font-weight: 900;
  color: #6741d9;
  width: clamp(52px, 14vw, 70px);
  height: clamp(52px, 14vw, 70px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ta-letter .ta-chip.ta-cursive {
  font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", "Comic Sans MS", cursive;
  font-style: italic;
  color: #b5179e;
}
/* Game 54: outline apples that fill with colour when tapped correctly */
.ta-apple .ta-chip,
.ta-chip-apple {
  position: relative;
  width: clamp(84px, 23vw, 116px);
  height: clamp(84px, 23vw, 116px);
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
}
.ta-apple .ta-chip:disabled { opacity: 0.5; }
.ta-apple-wrap { position: relative; display: block; width: 100%; height: 100%; }
.ta-apple-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ta-apple-body {
  fill: #fff;
  stroke: #b98a5e;
  stroke-width: 3;
  transition: fill 0.25s ease, stroke 0.25s ease;
}
.ta-apple-leaf { fill: #fff; stroke: #b98a5e; stroke-width: 3; transition: fill 0.25s ease, stroke 0.25s ease; }
.ta-apple-stem { stroke: #b98a5e; stroke-width: 4; stroke-linecap: round; transition: stroke 0.25s ease; }
.ta-numlabel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10%;
  font-size: clamp(1.1rem, 5.5vw, 1.7rem);
  font-weight: 900;
  color: #5a3a22;
  transition: color 0.25s ease;
}
.ta-check {
  position: absolute;
  top: 4%;
  right: 6%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2fb14a;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ta-chip.is-on .ta-apple-body { fill: #e63c33; stroke: #c22d25; }
.ta-chip.is-on .ta-apple-leaf { fill: #43b658; stroke: #2f9143; }
.ta-chip.is-on .ta-apple-stem { stroke: #7a4a1e; }
.ta-chip.is-on .ta-numlabel { color: #fff; }
.ta-chip.is-on .ta-check { opacity: 1; transform: scale(1); }
.ta-chip-apple.is-bad .ta-apple-body { stroke: #ff6b6b; }
.ta-chip-apple.is-bad { animation: lmShake 0.4s ease; }

/* word-build (48 compound, 52 decode) */
.wb { width: min(620px, 100%); margin: 0 auto; text-align: center; }
.wb-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #6741d9; margin: 0 0 12px; }
.wb-pic { display: block; margin: 0 auto 12px; }
.wb-emoji { font-size: clamp(3rem, 15vw, 4.6rem); line-height: 1; }
.wb-pic img { width: clamp(90px, 26vw, 130px); height: clamp(90px, 26vw, 130px); object-fit: contain; }
.wb-prompt {
  background: #f3f0ff; border: 2px dashed #c3b0f5; border-radius: 14px; padding: 12px 16px;
  margin: 0 auto 16px; font-weight: 700; color: #4b3ba9; line-height: 1.5; max-width: 520px;
}
.wb-prompt b { color: #e8590c; }
.wb-boxes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.wb-box {
  width: 46px; height: 54px; border: 3px solid #d0bfff; border-radius: 10px; text-align: center;
  font-size: 1.6rem; font-weight: 900; text-transform: uppercase; color: #4b3ba9; background: #fff;
}
.wb-box:focus { border-color: #7048e8; box-shadow: 0 0 0 3px rgba(112, 72, 232, 0.25); outline: none; }
.wb-space { width: 22px; }
.wb-boxes.is-right .wb-box { border-color: #37b24d; background: #ebfbee; color: #2f9e44; }
.wb-boxes.is-wrong { animation: lmShake 0.4s ease; }

/* vowel-pick (50) */
.vp { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.vp-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #e8590c; margin: 0 0 12px; }
.vp-pic { display: block; margin: 0 auto 10px; }
.vp-emoji { font-size: clamp(3rem, 15vw, 4.6rem); }
.vp-pic img { width: clamp(90px, 26vw, 130px); height: clamp(90px, 26vw, 130px); object-fit: contain; }
.vp-word { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.vp-letter, .vp-blank {
  font-size: clamp(2rem, 10vw, 3rem); font-weight: 900; color: #2b3a67; min-width: 0.7em;
}
.vp-blank { color: #adb5bd; }
.vp-blank.is-filled { color: #2f9e44; }
.vp-options { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.vp-opt {
  width: 62px; height: 62px; border: 3px solid #ffd8a8; border-radius: 14px; background: #fff;
  font-size: 1.7rem; font-weight: 900; color: #e8590c; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease;
}
.vp-opt:hover:not(:disabled) { transform: translateY(-2px); }
.vp-opt:disabled { opacity: 0.5; cursor: default; }
.vp-opt.is-right { border-color: #37b24d; color: #2f9e44; box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.3); }
.vp-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.4s ease; }

/* sentence-pick (51) */
.sp { width: min(620px, 100%); margin: 0 auto; text-align: center; }
.sp-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #1c7ed6; margin: 0 0 12px; }
.sp-pic { display: block; margin: 0 auto 12px; }
.sp-emoji { font-size: clamp(3rem, 14vw, 4.4rem); }
.sp-pic img { width: clamp(90px, 24vw, 120px); height: clamp(90px, 24vw, 120px); object-fit: contain; }
.sp-sentence { font-size: clamp(1.2rem, 5vw, 1.7rem); font-weight: 800; color: #2b3a67; margin: 0 0 20px; }
.sp-blank { display: inline-block; min-width: 90px; border-bottom: 3px solid #1c7ed6; color: #1c7ed6; }
.sp-blank.is-filled { color: #2f9e44; border-bottom-color: #2f9e44; }
.sp-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; max-width: 520px; margin: 0 auto; }
.sp-opt {
  border: 3px solid #cfe3f5; background: #fff; border-radius: 14px; padding: 14px 10px;
  font-size: clamp(1.1rem, 5vw, 1.5rem); font-weight: 800; color: #1c6fbf; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07); transition: transform 0.12s ease;
}
.sp-opt:hover:not(:disabled) { transform: translateY(-2px); }
.sp-opt:disabled { opacity: 0.6; cursor: default; }
.sp-opt.is-right { border-color: #37b24d; color: #2f9e44; box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.3); }
.sp-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.4s ease; }

/* shadow-match (49) */
.sm { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.sm-title { font-size: clamp(1.05rem, 4.2vw, 1.45rem); font-weight: 800; color: #495057; margin: 0 0 16px; }
.sm-cols { display: flex; justify-content: center; gap: clamp(30px, 12vw, 90px); }
.sm-col { display: flex; flex-direction: column; gap: 12px; }
.sm-cell {
  width: clamp(60px, 16vw, 84px); height: clamp(60px, 16vw, 84px); border: 3px solid #dee2e6;
  border-radius: 14px; background: #fff; font-size: clamp(2rem, 9vw, 3rem); line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.12s ease;
}
.sm-cell img { width: 82%; height: 82%; object-fit: contain; }
.sm-shadow { filter: brightness(0); }
.sm-shadow img { filter: brightness(0); }
.sm-cell:hover:not(.is-done) { transform: translateY(-2px); }
.sm-cell.is-sel { border-color: #1c7ed6; box-shadow: 0 0 0 4px rgba(28, 126, 214, 0.3); }
.sm-cell.is-done { border-color: #37b24d; background: #ebfbee; filter: none; cursor: default; opacity: 0.9; }
.sm-cell.is-done.sm-shadow { filter: none; }
.sm-cell.is-bad { border-color: #ff6b6b; animation: lmShake 0.4s ease; }

/* Game 43 — picture multiplication (card style) */
.pm { width: min(760px, 100%); margin: 0 auto; text-align: center; }
.pm-title {
  font-size: clamp(1.05rem, 4.2vw, 1.45rem);
  font-weight: 800;
  color: #6741d9;
  margin: 0 0 20px;
}
.pm-eq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 16px);
  flex-wrap: wrap;
  background: #fff;
  border: 3px solid #e3d8ff;
  border-radius: 20px;
  padding: 18px 14px;
  margin-bottom: 24px;
  box-shadow: 0 6px 16px rgba(103, 65, 217, 0.1);
}
.pm-group {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 4px 6px;
  justify-content: center;
  align-items: center;
  max-width: 44%;
}
.pm-obj {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 9vw, 58px);
  height: clamp(40px, 9vw, 58px);
}
.pm-obj img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2)); }
.pm-obj.pm-em { font-size: clamp(2rem, 7vw, 3rem); line-height: 1; }
/* size tiers based on how many objects are shown */
.pm-eq.pm-lg .pm-obj { width: clamp(50px, 12vw, 82px); height: clamp(50px, 12vw, 82px); }
.pm-eq.pm-lg .pm-obj.pm-em { font-size: clamp(2.6rem, 9vw, 3.8rem); }
.pm-eq.pm-md .pm-obj { width: clamp(40px, 9vw, 56px); height: clamp(40px, 9vw, 56px); }
.pm-eq.pm-md .pm-obj.pm-em { font-size: clamp(2rem, 7vw, 2.9rem); }
.pm-eq.pm-sm .pm-obj { width: clamp(26px, 6vw, 38px); height: clamp(26px, 6vw, 38px); }
.pm-eq.pm-sm .pm-obj.pm-em { font-size: clamp(1.3rem, 4.6vw, 2rem); }
.pm-op { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; color: #6741d9; }
.pm-answer {
  width: clamp(58px, 16vw, 84px);
  height: clamp(58px, 16vw, 84px);
  border: 4px dashed #c3b0f5;
  border-radius: 16px;
  background: #f6f2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.pm-answer.is-filled { border-style: solid; border-color: #7048e8; background: #efe7ff; transform: scale(1.06); }
.pm-q { font-size: clamp(2rem, 9vw, 3rem); font-weight: 900; color: #adb5bd; }
.pm-total { font-size: clamp(2rem, 9vw, 3rem); font-weight: 900; color: #6741d9; }
.pm-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 3.5vw, 22px);
  max-width: 520px;
  margin: 0 auto;
}
.pm-opt {
  background: #fff;
  border: 3px dashed #c3b0f5;
  border-radius: 16px;
  padding: 16px 8px;
  font-size: clamp(1.4rem, 7vw, 2rem);
  font-weight: 900;
  color: #6741d9;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.07);
  transition: transform 0.12s ease;
}
.pm-opt:hover:not(:disabled) { transform: translateY(-2px); }
.pm-opt:active:not(:disabled) { transform: translateY(2px); }
.pm-opt:disabled { cursor: default; }
.pm-opt.is-right { border-style: solid; border-color: #37b24d; color: #2f9e44; box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.3); }
.pm-opt.is-wrong { border-style: solid; border-color: #ff6b6b; animation: lmShake 0.4s ease; }

/* Game 42 — colour the box with the correct word (card 125 style) */
.wc { width: min(680px, 100%); margin: 0 auto; text-align: center; }
.wc-title {
  font-size: clamp(1.05rem, 4.2vw, 1.45rem);
  font-weight: 800;
  color: #1c7ed6;
  margin: 0 0 20px;
}
.wc-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4vw, 28px);
  margin-bottom: 26px;
}
.wc-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(110px, 32vw, 160px);
  height: clamp(110px, 32vw, 160px);
}
.wc-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18)); }
.wc-emoji { font-size: clamp(4.5rem, 22vw, 7rem); line-height: 1; }
.wc-arrow { font-size: clamp(1.8rem, 7vw, 2.6rem); color: #495057; font-weight: 900; }
.wc-answer {
  width: clamp(110px, 32vw, 160px);
  height: clamp(110px, 32vw, 160px);
  border: 4px dashed #a5c8e8;
  border-radius: 18px;
  background: #f4f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.wc-answer.is-filled { border-style: solid; transform: scale(1.04); }
.wc-q { font-size: clamp(3rem, 14vw, 4.5rem); font-weight: 900; color: #adb5bd; }
.wc-word {
  font-size: clamp(1.1rem, 5vw, 1.7rem);
  font-weight: 900;
  padding: 0 6px;
  text-align: center;
  word-break: break-word;
  animation: wcPop 0.3s ease;
}
@keyframes wcPop {
  0% { transform: scale(0.6); opacity: 0.4; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.wc-fly {
  position: fixed;
  transform: translate(-50%, -50%);
  font-size: clamp(1.3rem, 6vw, 1.8rem);
  font-weight: 900;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.22, 0.7, 0.3, 1);
  will-change: transform;
}
.wc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 3vw, 20px);
}
.wc-opt {
  background: #fff;
  border: 3px dashed;
  border-radius: 18px;
  padding: 20px 12px;
  font-size: clamp(1.3rem, 6vw, 1.8rem);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.07);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wc-opt:hover:not(:disabled) { transform: translateY(-2px); }
.wc-opt:active:not(:disabled) { transform: translateY(2px); }
.wc-opt:disabled { cursor: default; opacity: 0.85; }
.wc-opt.is-right { border-style: solid; transform: scale(1.03); }
.wc-opt.is-wrong { animation: lmShake 0.4s ease; }

/* Game 41 — correct spelling quiz (card 122 style) */
.sq { width: min(720px, 100%); margin: 0 auto; text-align: center; }
.sq-headline {
  display: inline-block;
  background: #fffdf5;
  border: 3px dashed #f6c453;
  border-radius: 20px;
  padding: 12px 26px;
  margin-bottom: 18px;
  line-height: 1.15;
}
.sq-head-a,
.sq-head-b {
  display: block;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: clamp(1rem, 4vw, 1.5rem);
}
.sq-head-a { color: #6b4423; }
.sq-head-b { color: #f76707; }
.sq-stage {
  background: #fffdf5;
  border: 3px dashed #ffcf40;
  border-radius: 24px;
  padding: 22px;
  margin: 0 auto 22px;
  width: min(360px, 88%);
  box-shadow: 0 8px 20px rgba(214, 154, 20, 0.15);
}
.sq-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.sq-img {
  width: min(220px, 60vw);
  height: min(220px, 60vw);
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.18));
}
.sq-emoji { font-size: clamp(5rem, 26vw, 8rem); line-height: 1; }
.sq-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(12px, 3vw, 20px);
  align-items: stretch;
}
.sq-opt {
  position: relative;
  background: #fff;
  border: 3px dashed #cfe3f5;
  border-radius: 18px;
  padding: 20px 12px 20px 20px;
  font-size: clamp(1.2rem, 5.5vw, 1.7rem);
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.07);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sq-opt:hover:not(:disabled) { transform: translateY(-2px); }
.sq-opt:active:not(:disabled) { transform: translateY(2px); }
.sq-opt:disabled { cursor: default; }
.sq-badge {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 4px 16px 4px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
}
.sq-opt.is-right { border-style: solid; border-color: #37b24d; box-shadow: 0 0 0 4px rgba(55, 178, 77, 0.35); }
.sq-opt.is-wrong { border-style: solid; border-color: #ff6b6b; animation: lmShake 0.4s ease; }

/* Game 40 — choose the right spelling (card 121 style) */
.sc { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.sc-title {
  font-size: clamp(1.1rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #1c7ed6;
  margin: 0 0 14px;
}
.sc-pic { font-size: clamp(3rem, 14vw, 4.6rem); line-height: 1; margin-bottom: 6px; }
.sc-word {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 2.5vw, 14px);
  flex-wrap: wrap;
  background: #fff9e6;
  border: 4px solid #ffcf40;
  border-radius: 20px;
  padding: 18px 16px;
  margin: 0 auto 22px;
  box-shadow: 0 6px 16px rgba(214, 154, 20, 0.18);
}
.sc-letter,
.sc-slot {
  font-size: clamp(2rem, 10vw, 3.2rem);
  font-weight: 900;
  color: #1b3a63;
  line-height: 1;
  min-width: 0.7em;
}
.sc-slot { color: #adb5bd; }
.sc-slot.is-filled { color: #2f9e44; }
.sc-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 3.5vw, 20px);
}
.sc-opt {
  position: relative;
  border: none;
  border-radius: 18px;
  padding: 22px 10px;
  font-size: clamp(1.4rem, 7vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  outline: 2px dashed rgba(255, 255, 255, 0.7);
  outline-offset: -8px;
}
.sc-opt:hover:not(:disabled) { transform: translateY(-2px); }
.sc-opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); }
.sc-opt:disabled { cursor: default; }
.sc-num {
  position: absolute;
  top: -12px;
  left: -8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}
.sc-opt.is-right { box-shadow: 0 0 0 4px #37b24d, 0 8px 16px rgba(55, 178, 77, 0.3); }
.sc-opt.is-wrong { animation: lmShake 0.4s ease; box-shadow: 0 0 0 4px #ff6b6b; }

/* Game 39 — what comes after (card 120 style) */
.na { width: min(640px, 100%); margin: 0 auto; text-align: center; }
.na-title {
  font-size: clamp(1.1rem, 4.4vw, 1.55rem);
  font-weight: 900;
  color: #d6336c;
  margin: 0 0 18px;
}
.na-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 3.5vw, 20px);
  margin-bottom: 20px;
}
.na-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  background: #fff;
  border: 3px solid #ffd8e6;
  border-radius: 16px;
  padding: 14px 10px;
  box-shadow: 0 4px 12px rgba(214, 51, 108, 0.08);
}
.na-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.na-tag {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}
.na-given {
  min-width: 46px;
  height: 46px;
  line-height: 46px;
  padding: 0 8px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.na-arrow { font-size: 1.4rem; color: #868e96; font-weight: 900; }
.na-input {
  width: 62px;
  height: 50px;
  border: 3px solid #b2f2bb;
  border-radius: 12px;
  text-align: center;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  font-weight: 900;
  color: #2b8a3e;
  background: #f4fff6;
  outline: none;
}
.na-input:focus { border-color: #37b24d; box-shadow: 0 0 0 3px rgba(55, 178, 77, 0.25); }
.na-mark {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 1rem;
}
.na-cell.is-right { border-color: #37b24d; background: #ebfbee; }
.na-cell.is-right .na-mark::after { content: "✅"; }
.na-cell.is-wrong { border-color: #ff6b6b; background: #fff5f5; animation: lmShake 0.4s ease; }
.na-cell.is-wrong .na-mark::after { content: "✏️"; }
.na-actions { display: flex; gap: 14px; justify-content: center; }
.na-hint-btn, .na-check {
  border: none;
  border-radius: 14px;
  padding: 11px 26px;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
}
.na-hint-btn { background: linear-gradient(180deg, #ffd43b, #f59f00); color: #5a3d00; }
.na-check { background: linear-gradient(180deg, #69db7c, #2f9e44); }
.na-hint-btn:hover, .na-check:hover { transform: translateY(-2px); }

/* Game 22 — jigsaw puzzle (card 57 style) */
.jg { width: min(920px, 100%); margin: 0 auto; text-align: center; }
.jg-title {
  font-size: clamp(1.15rem, 4.6vw, 1.7rem);
  font-weight: 900;
  color: #d6336c;
  margin: 0 0 4px;
  line-height: 1.2;
}
.jg-sub {
  display: inline-block;
  background: #fff7e0;
  border: 2px solid #ffe08a;
  border-radius: 14px;
  padding: 6px 14px;
  color: #7a4b00;
  font-weight: 700;
  font-size: clamp(0.82rem, 3vw, 1rem);
  margin: 0 0 16px;
}
.jg-main {
  display: flex;
  gap: clamp(12px, 4vw, 30px);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.jg-board {
  display: grid;
  gap: 3px;
  width: clamp(240px, 66vw, 420px);
  aspect-ratio: 1 / 1;
  padding: 8px;
  background: #fff;
  border: 4px solid #ffd0e0;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(214, 51, 108, 0.15);
}
.jg-slot {
  border: 2px dashed #f0a6c0;
  border-radius: 8px;
  background: #fff5f9;
  overflow: hidden;
  position: relative;
}
.jg-slot.is-filled { border-style: solid; border-color: #ffd0e0; }
.jg-portion {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  border-radius: 6px;
}
.jg-tray {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: #ffeef5;
  border: 3px dashed #f7a8c4;
  border-radius: 18px;
  min-width: 120px;
  align-items: center;
}
.jg-piece {
  width: clamp(66px, 20vw, 104px);
  height: clamp(66px, 20vw, 104px);
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  border: 2px solid #fff;
  touch-action: none;
  transition: transform 0.12s ease;
}
.jg-piece:hover { transform: scale(1.05); }
.jg-piece.is-dragging { opacity: 0.35; }
.jg-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  border: 2px solid #fff;
}
.jg-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 20px;
}
.jg-abtn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease;
}
.jg-abtn:hover { transform: translateY(-2px); }
.jg-reset { background: linear-gradient(180deg, #ff8fab, #f4538a); }
.jg-hintbtn { background: linear-gradient(180deg, #b197fc, #7048e8); }
.jg-shuffle { background: linear-gradient(180deg, #74c0fc, #3b8fe0); }
.jg-hint-n {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff6b6b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  padding: 0 4px;
}
@media (max-width: 540px) {
  .jg-main { flex-direction: column; align-items: center; }
  .jg-tray { flex-direction: row; flex-wrap: wrap; justify-content: center; width: 100%; }
}

/* Game 38 — colour by number */
.cbn {
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}
.cbn-title {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #2f9e44;
  margin: 2px 0 16px;
}
.cbn-wrap {
  display: flex;
  gap: clamp(10px, 3vw, 20px);
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}
.cbn-palette {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 520px) {
  .cbn-palette { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
.cbn-swatch {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.cbn-swatch:hover { transform: scale(1.08); }
.cbn-swatch.is-active {
  outline: 4px solid #495057;
  outline-offset: 2px;
  transform: scale(1.12);
}
.cbn-swnum {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 1.1rem;
}
.cbn-grid {
  display: grid;
  gap: 2px;
  background: #dee2e6;
  padding: 4px;
  border-radius: 10px;
  width: min(400px, 78vw);
  aspect-ratio: 1 / 1;
}
.cbn-cell {
  border: none;
  background: #fff;
  font-size: clamp(0.55rem, 2.4vw, 0.85rem);
  font-weight: 700;
  color: #adb5bd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 3px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.cbn-cell.is-blank { background: #f8f9fa; cursor: default; }
.cbn-cell.is-filled { color: transparent; }
.cbn-cell.is-wrong { animation: lmShake 0.4s ease; box-shadow: inset 0 0 0 3px #ff6b6b; }
.cbn-status {
  margin-top: 14px;
  font-weight: 700;
  color: #495057;
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
}

/* Game 37 — choose the correct fraction (pizza) */
.fp {
  width: min(560px, 100%);
  margin: 0 auto;
  text-align: center;
}
.fp-title {
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #e8590c;
  margin: 2px 0 18px;
}
.fp-pizza {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.fp-obj { color: #6741d9; white-space: nowrap; }
.fp-bar-shape {
  display: flex;
  width: min(420px, 90%);
  height: clamp(70px, 20vw, 110px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.fp-bar-cell {
  flex: 1 1 0;
  border: 2px solid;
  box-sizing: border-box;
}
.fp-set {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(6px, 2.5vw, 14px);
  max-width: 460px;
}
.fp-set-item {
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  line-height: 1;
  transition: transform 0.15s ease;
}
.fp-set-item.is-on {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
  transform: scale(1.05);
}
.fp-set-item.is-off {
  filter: grayscale(1);
  opacity: 0.35;
}
.fp-svg {
  width: clamp(200px, 60vw, 260px);
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}
.fp-options {
  display: flex;
  gap: clamp(14px, 5vw, 28px);
  justify-content: center;
  flex-wrap: wrap;
}
.fp-opt {
  background: #fff;
  border: 3px solid #ffd8a8;
  border-radius: 16px;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 74px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.fp-opt:hover { transform: translateY(-3px); }
.fp-num,
.fp-den {
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 900;
  color: #6741d9;
  line-height: 1;
}
.fp-bar {
  width: 34px;
  height: 4px;
  background: #6741d9;
  border-radius: 2px;
  margin: 2px 0;
}
.fp-opt.is-right { border-color: #37b24d; background: #ebfbee; }
.fp-opt.is-right .fp-num,
.fp-opt.is-right .fp-den { color: #2f9e44; }
.fp-opt.is-right .fp-bar { background: #2f9e44; }
.fp-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.5s ease; }

/* Game 19 — fill the missing letters (festivals/dishes/fruits) */
.fw {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}
.fw-badge {
  position: absolute;
  top: -14px;
  left: 6px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 18px;
  background: #f06595;
  color: #fff;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(214, 51, 108, 0.4);
}
.fw-title {
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #7048e8;
  margin: 2px 0 18px;
  line-height: 1.25;
}
.fw-body {
  display: flex;
  gap: clamp(12px, 3vw, 22px);
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}
.fw-pic {
  flex: 1 1 220px;
  max-width: 320px;
  min-height: 200px;
  background: linear-gradient(160deg, #ede4ff 0%, #ffe3f1 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: inset 0 0 0 3px #fff;
}
.fw-emoji { font-size: clamp(5rem, 24vw, 8rem); line-height: 1; }
.fw-img { max-width: 100%; max-height: 260px; border-radius: 12px; object-fit: contain; }
.fw-right {
  flex: 1 1 240px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.fw-cluebar {
  background: linear-gradient(90deg, #f783ac, #e64980);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: clamp(0.85rem, 3vw, 1rem);
}
.fw-slots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.fw-slots.shake { animation: lmShake 0.5s ease; }
.fw-slot {
  width: clamp(38px, 10vw, 52px);
  height: clamp(46px, 12vw, 62px);
  border-radius: 12px;
  border: 3px solid #f7a8c4;
  background: #fff;
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 900;
  color: #6741d9;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  outline: none;
  padding: 0;
}
.fw-slot.is-given { background: #f8f0ff; border-color: #d0bfff; }
.fw-input {
  display: block;
  padding: 0;
  line-height: normal;
  -webkit-appearance: none;
  appearance: none;
}
.fw-input:focus { border-color: #e64980; box-shadow: 0 0 0 3px rgba(230, 73, 128, 0.25); }
.fw-input.is-wrong { border-color: #ff6b6b; background: #fff5f5; color: #e03131; }
.fw-space { width: 14px; }
.fw-clue {
  background: #fff8dd;
  border: 2px dashed #ffe08a;
  border-radius: 14px;
  padding: 12px 14px;
  color: #5f3dc4;
  font-weight: 700;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  text-align: left;
}
.fw-hintrow {
  margin: 18px auto 6px;
  max-width: 92%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fw-hint-btn {
  border: none;
  border-radius: 20px;
  padding: 8px 22px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(90deg, #f783ac, #e64980);
  box-shadow: 0 4px 10px rgba(230, 73, 128, 0.4);
  cursor: pointer;
}
.fw-hint-text {
  background: #fff0f6;
  border-radius: 12px;
  padding: 10px 14px;
  color: #495057;
  font-weight: 600;
  font-size: clamp(0.86rem, 3.2vw, 1rem);
}
.fw-hint-text.is-hidden { display: none; }
.fw-check {
  margin-top: 16px;
  border: none;
  border-radius: 16px;
  padding: 12px 34px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #b197fc, #7048e8);
  box-shadow: 0 6px 14px rgba(112, 72, 229, 0.45);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.fw-check:hover { transform: translateY(-2px); }
.fw-check:disabled { filter: grayscale(0.5); opacity: 0.7; cursor: default; }

/* Game 36 — arrange numbers in order (diamonds) */
.on {
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}
.on-title {
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #6741d9;
  margin: 2px 0 6px;
}
.on-word { color: #e8590c; }
.on-sub {
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  color: #495057;
  margin: 0 0 24px;
  font-weight: 600;
}
.on-hint-wrap { margin: 0 0 20px; }
.on-hint-btn {
  border: none;
  background: #f1e6ff;
  color: #6741d9;
  font-weight: 800;
  border-radius: 14px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: clamp(0.85rem, 3vw, 1rem);
  box-shadow: 0 3px 0 rgba(103, 65, 217, 0.2);
}
.on-hint-btn:active { transform: translateY(2px); box-shadow: none; }
.on-hint {
  margin: 12px auto 0;
  max-width: 460px;
  background: #fff7e0;
  border: 2px solid #ffe08a;
  border-radius: 14px;
  padding: 10px 16px;
  color: #7a5300;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.1vw, 1rem);
}
.on-hint.is-hidden { display: none; }
.on-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: clamp(16px, 5vw, 30px);
  justify-items: center;
  padding: 6px;
}
.on-item {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: clamp(64px, 18vw, 88px);
  height: clamp(64px, 18vw, 88px);
}
.on-diamond {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #7048e8, #5f3dc4);
  border-radius: 14px;
  transform: rotate(45deg);
  box-shadow: 0 6px 14px rgba(95, 61, 196, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}
.on-item:hover .on-diamond { transform: rotate(45deg) scale(1.06); }
.on-val {
  transform: rotate(-45deg);
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
}
.on-rank {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffd43b;
  color: #7048e8;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.on-item.is-ranked .on-diamond { background: linear-gradient(150deg, #51cf66, #2f9e44); }
.on-item.is-ranked .on-rank { opacity: 1; transform: scale(1); }
.on-item.is-wrong .on-diamond {
  background: linear-gradient(150deg, #ff8787, #e03131);
  animation: lmShake 0.5s ease;
}

/* Game 35 — who am I? riddles */
.wai {
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}
.wai-title {
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 900;
  color: #e8590c;
  margin: 2px 0 20px;
}
.wai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 3.5vw, 20px);
  margin-bottom: 20px;
}
.wai-cell {
  position: relative;
  background: #fff;
  border: 3px solid #ffe3c2;
  border-radius: 18px;
  padding: 14px 12px 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.wai-emoji {
  font-size: clamp(3rem, 13vw, 4.4rem);
  line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}
.wai-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(76px, 20vw, 118px);
  height: clamp(76px, 20vw, 118px);
  margin: 0 auto;
}
.wai-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.18));
}
.wai-clue {
  font-size: clamp(0.92rem, 3.4vw, 1.08rem);
  font-weight: 700;
  color: #495057;
  margin: 0;
}
.wai-input {
  width: 92%;
  border: none;
  border-bottom: 3px dashed #adb5bd;
  background: transparent;
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
  color: #343a40;
  padding: 6px 2px;
  outline: none;
  text-transform: lowercase;
}
.wai-input:focus { border-bottom-color: #f76707; }
.wai-mark {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.wai-cell.is-right { border-color: #37b24d; background: #ebfbee; }
.wai-cell.is-right .wai-mark { opacity: 1; }
.wai-cell.is-right .wai-mark::after { content: "✅"; }
.wai-cell.is-wrong { border-color: #ff6b6b; background: #fff5f5; animation: lmShake 0.4s ease; }
.wai-cell.is-wrong .wai-mark { opacity: 1; }
.wai-cell.is-wrong .wai-mark::after { content: "✏️"; }
.wai-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.wai-hint-btn,
.wai-check {
  border: none;
  border-radius: 16px;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.wai-hint-btn { background: #fff3bf; color: #b8860b; box-shadow: 0 5px 12px rgba(240, 200, 60, 0.4); }
.wai-check { color: #fff; background: linear-gradient(180deg, #ffa94d, #f76707); box-shadow: 0 6px 14px rgba(247, 103, 7, 0.45); }
.wai-hint-btn:hover,
.wai-check:hover { transform: translateY(-2px); }
.wai-check:disabled { filter: grayscale(0.5); opacity: 0.7; cursor: default; }

/* Game 34 — circle the picture that matches the word */
.wp {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: center;
}
.wp-instruction {
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  color: #d6336c;
  background: #fff0f6;
  border-radius: 14px;
  padding: 8px 14px;
  margin: 0 auto 18px;
  max-width: 92%;
  font-weight: 600;
}
.wp-word {
  font-size: clamp(2.4rem, 11vw, 4rem);
  font-weight: 900;
  color: #7048e8;
  letter-spacing: 2px;
  text-shadow: 2px 3px 0 rgba(112, 72, 229, 0.18);
  margin-bottom: 22px;
  text-transform: capitalize;
}
.wp-options {
  display: flex;
  gap: clamp(12px, 4vw, 26px);
  justify-content: center;
  flex-wrap: wrap;
}
.wp-opt {
  position: relative;
  background: #fff;
  border: 3px solid #e9ecef;
  border-radius: 20px;
  width: clamp(96px, 26vw, 140px);
  height: clamp(96px, 26vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.wp-opt:hover { transform: translateY(-4px); }
.wp-emoji {
  font-size: clamp(3rem, 14vw, 4.6rem);
  line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}
.wp-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82%;
  height: 82%;
}
.wp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.18));
}
.wp-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 5px solid transparent;
  pointer-events: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.wp-opt.is-right { border-color: #37b24d; }
.wp-opt.is-right .wp-ring { border-color: #2f9e44; transform: scale(1.02); }
.wp-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.5s ease; }
.wp-opt.is-wrong .wp-ring { border-color: #e03131; }

/* Game 33 — write the numbers in words */
.niw {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: center;
}
.niw-title {
  font-size: clamp(1.1rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #2f9e44;
  margin: 2px 0 20px;
}
.niw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(12px, 3.5vw, 22px);
  margin-bottom: 20px;
}
.niw-cell {
  position: relative;
  background: #fff;
  border: 3px solid #e9ecef;
  border-radius: 18px;
  padding: 10px 10px 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.niw-num {
  display: block;
  font-size: clamp(3.4rem, 16vw, 5.6rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.12);
}
.niw-input {
  width: 92%;
  border: none;
  border-bottom: 3px dashed #adb5bd;
  background: transparent;
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 700;
  color: #343a40;
  padding: 6px 2px;
  outline: none;
  text-transform: lowercase;
}
.niw-input:focus { border-bottom-color: #f06595; }
.niw-mark {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.niw-cell.is-right { border-color: #37b24d; background: #ebfbee; }
.niw-cell.is-right .niw-mark { opacity: 1; }
.niw-cell.is-right .niw-mark::after { content: "✅"; }
.niw-cell.is-wrong { border-color: #ff6b6b; background: #fff5f5; animation: lmShake 0.4s ease; }
.niw-cell.is-wrong .niw-mark { opacity: 1; }
.niw-cell.is-wrong .niw-mark::after { content: "✏️"; }
.niw-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.niw-hint-btn,
.niw-check {
  border: none;
  border-radius: 16px;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.niw-hint-btn { background: #fff3bf; color: #b8860b; box-shadow: 0 5px 12px rgba(240, 200, 60, 0.4); }
.niw-check { color: #fff; background: linear-gradient(180deg, #69db7c, #37b24d); box-shadow: 0 6px 14px rgba(55, 178, 77, 0.45); }
.niw-hint-btn:hover,
.niw-check:hover { transform: translateY(-2px); }
.niw-check:disabled { filter: grayscale(0.5); opacity: 0.7; cursor: default; }

/* Game 17 — tick the right object */
.po-card {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 3px solid #ffd6e6;
  border-radius: 22px;
  padding: 20px 18px 22px;
  box-shadow: 0 10px 28px rgba(214, 51, 108, 0.14);
  text-align: center;
}
.po-badge {
  position: absolute;
  top: -16px;
  left: 18px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 18px;
  background: #f06595;
  color: #fff;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(214, 51, 108, 0.4);
}
.po-question {
  font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  font-weight: 900;
  color: #7048e8;
  margin: 4px 0 6px;
  line-height: 1.25;
}
.po-hint {
  font-size: clamp(0.9rem, 3.4vw, 1.02rem);
  color: #d6336c;
  background: #fff0f6;
  border-radius: 14px;
  padding: 8px 12px;
  margin: 0 auto 16px;
  max-width: 92%;
  font-weight: 600;
}
.po-options {
  display: flex;
  gap: clamp(12px, 4vw, 22px);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.po-opt {
  flex: 1 1 40%;
  max-width: 210px;
  min-width: 130px;
  background: #fff;
  border: 3px solid #d0ebff;
  border-radius: 18px;
  padding: 16px 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.po-opt:hover { transform: translateY(-3px); }
.po-emoji {
  font-size: clamp(3.4rem, 15vw, 5rem);
  line-height: 1;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.12));
}
.po-name {
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 800;
  color: #3b3b6d;
}
.po-tick {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 3px solid #c5c9e0;
  background: #fff;
  position: relative;
  transition: all 0.15s ease;
}
.po-opt.is-selected { border-color: #f783ac; box-shadow: 0 6px 16px rgba(247, 131, 172, 0.4); }
.po-opt.is-selected .po-tick { border-color: #f06595; background: #ffe3ef; }
.po-opt.is-selected .po-tick::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f06595;
  font-weight: 900;
  font-size: 1.3rem;
}
.po-opt.is-right { border-color: #51cf66; background: #ebfbee; }
.po-opt.is-right .po-tick { border-color: #37b24d; background: #d3f9d8; }
.po-opt.is-right .po-tick::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f9e44;
  font-weight: 900;
  font-size: 1.4rem;
}
.po-opt.is-wrong { border-color: #ff6b6b; animation: lmShake 0.4s ease; }
.po-check {
  border: none;
  border-radius: 16px;
  padding: 12px 34px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #f783ac, #e64980);
  box-shadow: 0 6px 14px rgba(230, 73, 128, 0.45);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.po-check:hover { transform: translateY(-2px); }
.po-check:disabled { filter: grayscale(0.5); opacity: 0.7; cursor: default; }

/* wide layout + numbered cards (Game 18: national symbols, 3 options) */
.po-card.po-wide { width: min(680px, 100%); }
.po-numbered .po-opt {
  position: relative;
  padding-top: 24px;
  flex: 1 1 28%;
  min-width: 110px;
}
.po-num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.po-numbered .po-opt:nth-child(1) .po-num { background: #7048e8; }
.po-numbered .po-opt:nth-child(2) .po-num { background: #37b24d; }
.po-numbered .po-opt:nth-child(3) .po-num { background: #f76707; }
.po-numbered .po-opt:nth-child(4) .po-num { background: #1c7ed6; }
.po-numbered .po-opt:nth-child(1) { border-color: #d0bfff; }
.po-numbered .po-opt:nth-child(2) { border-color: #b2f2bb; }
.po-numbered .po-opt:nth-child(3) { border-color: #ffd8a8; }
.po-numbered .po-opt:nth-child(4) { border-color: #a5d8ff; }
.po-numbered .po-name {
  background: #f1f3f5;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: clamp(0.82rem, 3vw, 1rem);
}
.po-fact {
  display: none;
  background: #fff0f6;
  border: 2px dashed #f7a8c4;
  border-radius: 14px;
  padding: 10px 14px;
  margin: 4px auto 14px;
  color: #495057;
  font-size: clamp(0.86rem, 3.2vw, 1rem);
  max-width: 94%;
  text-align: left;
}
.po-fact.show { display: block; animation: ptPulse 0.4s ease; }
.po-fact strong { color: #d6336c; }

/* Game 16 — match the other half */
.hm { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.hm-title {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #d6336c;
  margin: 2px 0 18px;
}
.hm-board { position: relative; padding: 6px; }
.hm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.hm-line {
  stroke: #f06595;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
}
.hm-row {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 20px);
}
.hm-toprow { margin-bottom: clamp(70px, 18vw, 120px); }
.hm-cell {
  position: relative;
  flex: 1 1 0;
  max-width: 130px;
  background: #fff;
  border: 3px dashed #f7a8c4;
  border-radius: 16px;
  padding: 8px;
  transition: transform 0.55s cubic-bezier(0.34, 1.2, 0.44, 1), opacity 0.4s ease;
  will-change: transform;
}
.hm-clip {
  height: clamp(52px, 15vw, 74px);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.hm-full {
  font-size: clamp(104px, 30vw, 148px);
  line-height: 1;
  height: clamp(104px, 30vw, 148px);
  display: block;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}
.hm-cell.hm-bottom .hm-full { margin-top: calc(-1 * clamp(52px, 15vw, 74px)); }
.hm-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f06595;
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(214, 51, 108, 0.5);
  cursor: pointer;
  z-index: 6;
  touch-action: none;
}
.hm-cell.hm-top .hm-dot { bottom: -13px; }
.hm-cell.hm-bottom .hm-dot { top: -13px; }
.hm-cell.is-joining { z-index: 20; border-color: #06d6a0; }
.hm-cell.is-joined { border-color: transparent; background: transparent; }
.hm-cell.is-gone { opacity: 0; }
.hm-board.hm-shake { animation: lmShake 0.4s ease; }

/* Game 32 — fill in the blanks */
.fb { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.fb-title {
  font-size: clamp(1.05rem, 4.4vw, 1.45rem);
  font-weight: 900;
  color: #0b7285;
  margin: 2px 0 16px;
}
.fb-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.fb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 16px;
  background: #fff;
  border: 3px solid #c3f0f5;
  box-shadow: 0 6px 14px rgba(11, 114, 133, 0.08);
  text-align: left;
}
.fb-emoji { font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1; flex: 0 0 auto; }
.fb-text { font-size: clamp(1.05rem, 4.6vw, 1.4rem); font-weight: 700; color: #2a2350; }
.fb-slot {
  display: inline-block;
  min-width: 96px;
  padding: 3px 12px;
  margin: 0 2px;
  border: none;
  border-bottom: 3px dashed #ff9f1c;
  background: #fff8ec;
  font-size: inherit;
  font-weight: 900;
  color: #d9480f;
  cursor: pointer;
  border-radius: 8px 8px 4px 4px;
  vertical-align: middle;
}
.fb-slot.is-filled { border-bottom-style: solid; border-bottom-color: #12b886; background: #e6fcf5; color: #0b7a5a; }
.fb-slot.is-good { border-bottom-color: #06d6a0; background: #e8fff4; }
.fb-slot.is-bad { border-bottom-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }
.fb-bank-label { font-weight: 800; color: #0b7285; margin: 4px 0; }
.fb-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 16px;
  padding: 12px;
  max-width: 460px;
  background: linear-gradient(135deg, #e3fafc, #f3f0ff);
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px rgba(11, 114, 133, 0.12);
}
.fb-chip {
  padding: 9px 16px;
  border: none;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #4dc9e6, #2bb1d6);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.12s ease;
}
.fb-chip { touch-action: none; user-select: none; }
.fb-chip:hover:not(.is-used) { transform: translateY(-2px); }
.fb-chip.is-picked { outline: 4px solid #ffd43b; transform: scale(1.06); }
.fb-chip.is-used { opacity: 0.25; pointer-events: none; filter: grayscale(1); }
.fb-chip.is-dragging { opacity: 0.4; }
.fb-slot.is-target { border-bottom-color: #2bb1d6; background: #eaf9fd; }
.fb-slot.is-over { background: #d0f0fb; box-shadow: 0 0 0 3px rgba(43, 177, 214, 0.4); }
.fb-ghost {
  position: fixed;
  transform: translate(-50%, -50%) rotate(-3deg);
  pointer-events: none;
  z-index: 9999;
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(180deg, #4dc9e6, #2bb1d6);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.fb-actions { display: flex; justify-content: center; }
.fb-btn {
  padding: 13px 34px;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #6ac36a, #3fa93f);
  box-shadow: 0 6px 14px rgba(63, 169, 63, 0.35);
  transition: transform 0.15s ease;
}
.fb-btn:hover { transform: translateY(-2px); }

/* Game 31 — odd one out in each row */
.orx { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.orx-title {
  font-size: clamp(1.05rem, 4.4vw, 1.45rem);
  font-weight: 900;
  color: #b25a00;
  margin: 2px 0 16px;
}
.orx-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.orx-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 16px;
  background: #fff;
  border: 3px solid #ffe0b8;
  box-shadow: 0 6px 14px rgba(178, 90, 0, 0.08);
}
.orx-item {
  position: relative;
  flex: 1 1 0;
  max-width: 84px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.orx-item:hover:not(:disabled) { transform: scale(1.08); }
.orx-item.is-picked::after,
.orx-item.is-good::after,
.orx-item.is-bad::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 4px solid #ffb703;
  pointer-events: none;
}
.orx-item.is-picked::after { border-color: #ff9f1c; }
.orx-item.is-good::after { border-color: #06d6a0; }
.orx-item.is-bad::after { border-color: #ff5d8f; animation: lmShake 0.4s ease; }
.orx-actions { display: flex; justify-content: center; }
.orx-check {
  padding: 13px 34px;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #6ac36a, #3fa93f);
  box-shadow: 0 6px 14px rgba(63, 169, 63, 0.35);
  transition: transform 0.15s ease;
}
.orx-check:hover { transform: translateY(-2px); }

/* Game 15 — picture crossword */
.pcw { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.pcw-tip { font-weight: 700; color: #6b46c1; margin: 0 0 14px; }
.pcw-pics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.pcw-pic {
  position: relative;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff, #f3ecff);
  border: 3px solid #d9c9ff;
  box-shadow: 0 6px 12px rgba(107, 70, 193, 0.15);
}
.pcw-emoji { font-size: 2.6rem; line-height: 1; }
.pcw-pnum {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f26aa0;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 3px 6px rgba(242, 106, 160, 0.45);
}
.pcw-grid {
  display: grid;
  grid-template-columns: repeat(var(--pcw-cols), 1fr);
  gap: 4px;
  width: min(100%, calc(var(--pcw-cols) * 52px));
  margin: 0 auto 18px;
}
.pcw-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}
.pcw-cell.is-block { background: transparent; }
.pcw-cell:not(.is-block) {
  background: #fff;
  border: 2px solid #b9a7ec;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.04);
}
.pcw-num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 0.62rem;
  font-weight: 900;
  color: #f2545b;
  z-index: 2;
  pointer-events: none;
}
.pcw-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  font-weight: 900;
  color: #2a2350;
  border-radius: 8px;
  padding: 0;
}
.pcw-input:focus {
  outline: none;
  background: #fff7d6;
  box-shadow: inset 0 0 0 2px #ffd43b;
}
.pcw-fixed {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  font-weight: 900;
  color: #1769aa;
}
.pcw-cell.is-given { background: #eaf6ff; border-color: #7cc0f0; }
.pcw-cell.is-good { background: #e8fff4; border-color: #06d6a0; }
.pcw-cell.is-bad { background: #ffe9f0; border-color: #ff5d8f; animation: lmShake 0.4s ease; }
.pcw-hints {
  text-align: left;
  max-width: 340px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f3ecff;
  border: 2px dashed #c9b3f5;
}
.pcw-hint-title { margin: 0 0 6px; font-weight: 900; color: #6b46c1; letter-spacing: 1px; }
.pcw-hints ul { margin: 0; padding-left: 18px; }
.pcw-hints li { font-weight: 600; color: #3a3160; margin: 3px 0; }
.pcw-actions { display: flex; justify-content: center; gap: 12px; }
.pcw-btn {
  padding: 12px 26px;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  font-size: 1.02rem;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.pcw-btn:hover { transform: translateY(-2px); }
.pcw-clear { background: linear-gradient(135deg, #b8b0cc, #8b8299); }
.pcw-check { background: linear-gradient(135deg, #6ac36a, #3fa93f); }

/* Game 30 — true or false math */
.tf-game { width: min(520px, 100%); margin: 0 auto; text-align: center; }
.tf-headline {
  font-size: clamp(1.05rem, 4.4vw, 1.45rem);
  font-weight: 900;
  color: #1b7f5a;
  margin: 2px 0 16px;
}
.tf-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.tf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  border: 3px solid #d7ecff;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tf-expr {
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 900;
  color: #223a56;
  letter-spacing: 1px;
  min-width: 90px;
  text-align: left;
}
.tf-choices { display: flex; gap: 10px; }
.tf-opt {
  min-width: 64px;
  padding: 9px 14px;
  border: 3px solid transparent;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tf-true { background: linear-gradient(180deg, #5ab0ff, #3d8bff); }
.tf-false { background: linear-gradient(180deg, #ff8a8a, #f2545b); }
.tf-opt:hover:not(:disabled) { transform: translateY(-2px); }
.tf-opt.is-picked { outline: 4px solid #ffd43b; transform: translateY(-1px) scale(1.05); }
.tf-opt:disabled { cursor: default; opacity: 0.9; }
.tf-row.is-good { border-color: #06d6a0; background: #e8fff4; }
.tf-row.is-bad { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }
.tf-actions { display: flex; justify-content: center; }
.tf-check {
  padding: 13px 34px;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #6ac36a, #3fa93f);
  box-shadow: 0 6px 14px rgba(63, 169, 63, 0.35);
  transition: transform 0.15s ease;
}
.tf-check:hover { transform: translateY(-2px); }

/* Game 14 — identify the famous personality/place */
.iq-card {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 20px 18px 22px;
  border-radius: 26px;
  background: #fff;
  border: 4px solid #f26aa0;
  box-shadow: 0 14px 30px rgba(26, 43, 74, 0.16);
}
.iq-badge {
  position: absolute;
  top: -16px;
  left: 20px;
  min-width: 40px;
  padding: 6px 12px;
  border-radius: 14px;
  background: #f26aa0;
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 5px 10px rgba(242, 106, 160, 0.4);
}
.iq-prompt {
  margin: 6px 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fde7f1;
  color: #b0246a;
  font-weight: 800;
  font-size: clamp(1rem, 4vw, 1.2rem);
  text-align: center;
}
.iq-pic {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, #dbeafe 0%, #ede4ff 55%, #ffe3f1 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}
.iq-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iq-emoji { font-size: clamp(5rem, 26vw, 9rem); line-height: 1; }
.iq-options { display: flex; flex-direction: column; gap: 12px; }
.iq-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 3px solid #e3e0ef;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.iq-opt:hover:not(:disabled) { transform: translateY(-2px); border-color: #c9a7f5; }
.iq-box {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 3px solid #b6b0c9;
  background: #fff;
  position: relative;
}
.iq-name { font-weight: 800; font-size: clamp(1rem, 4.2vw, 1.25rem); color: #2a2350; }
.iq-opt.is-right { border-color: #06d6a0; background: #e8fff4; }
.iq-opt.is-right .iq-box { border-color: #06d6a0; background: #06d6a0; }
.iq-opt.is-right .iq-box::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}
.iq-opt.is-wrong { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }
.iq-opt:disabled { cursor: default; }

/* Game 13 — choose the missing letter */
.ml-game { width: min(640px, 100%); margin: 0 auto; text-align: center; }
.ml-headline {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #7048e8;
  margin: 2px 0 6px;
}
.ml-tip { font-weight: 700; color: #245d87; margin: 0 0 16px; }
.ml-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}
.ml-card {
  flex: 1 1 200px;
  max-width: 260px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 3px solid rgba(76, 201, 240, 0.28);
  box-shadow: 0 10px 22px rgba(26, 43, 74, 0.12);
}
.ml-pic {
  font-size: clamp(3.4rem, 16vw, 5.5rem);
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.14));
}
.ml-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ml-slot, .ml-fixed {
  width: clamp(34px, 10vw, 46px);
  height: clamp(34px, 10vw, 46px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  font-weight: 900;
}
.ml-fixed { background: #eef6ff; color: #23405c; }
.ml-slot {
  background: #fff;
  border: 3px dashed #ff9ec4;
  color: #ff5d9e;
  cursor: pointer;
  animation: ptPulse 1.3s ease-in-out infinite;
}
.ml-slot.is-filled {
  border-style: solid;
  border-color: #4dabf7;
  background: #eaf6ff;
  color: #1769aa;
  animation: none;
}
.ml-slot.is-right { border-color: #06d6a0; background: #e8fff4; color: #067a56; }
.ml-slot.is-bad { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }
.ml-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 16px;
  padding: 14px;
  max-width: 420px;
  background: linear-gradient(135deg, #f3eaff, #eef6ff);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(132, 94, 247, 0.18);
}
.ml-chip {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
}
.ml-chip:nth-child(1) { background: linear-gradient(180deg, #ff8fc0, #f760a0); }
.ml-chip:nth-child(2) { background: linear-gradient(180deg, #9be36a, #7bc142); }
.ml-chip:nth-child(3) { background: linear-gradient(180deg, #6ab7ff, #3d9bff); }
.ml-chip:nth-child(4) { background: linear-gradient(180deg, #ffca5f, #ff9f43); }
.ml-chip:active { cursor: grabbing; }
.ml-chip.is-picked { transform: scale(1.14); outline: 3px solid #7048e8; }
.ml-chip.is-dragging { opacity: 0.35; }
.ml-chip.is-out { opacity: 0.25; filter: grayscale(1); pointer-events: none; }
.ml-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #9be36a, #7bc142);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}
.ml-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ml-btn {
  padding: 13px 26px;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.16);
  transition: transform 0.15s ease;
}
.ml-btn:hover { transform: translateY(-2px); }
.ml-hint { background: linear-gradient(135deg, #9d6bff, #7048e8); }
.ml-check { background: linear-gradient(135deg, #6ac36a, #4caf50); }

/* Game 29 — complete the pattern */
.pt-game { width: min(600px, 100%); margin: 0 auto; text-align: center; }
.pt-headline {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #e6447f;
  margin: 2px 0 16px;
}
.pt-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pt-tile {
  width: clamp(48px, 14vw, 68px);
  height: clamp(48px, 14vw, 68px);
  display: grid;
  place-items: center;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  border-radius: 16px;
  background: #fff;
  border: 3px solid rgba(76, 201, 240, 0.3);
  box-shadow: 0 5px 12px rgba(26, 43, 74, 0.1);
}
.pt-slot {
  border-style: dashed;
  border-color: #ff9ec4;
  color: #ff5d9e;
  font-weight: 900;
  animation: ptPulse 1.2s ease-in-out infinite;
}
.pt-slot.is-filled {
  border-style: solid;
  border-color: #06d6a0;
  background: #e8fff4;
  animation: none;
}
@keyframes ptPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.pt-question {
  font-size: clamp(1rem, 4.2vw, 1.3rem);
  font-weight: 800;
  color: #2a3154;
  margin: 0 0 14px;
}
.pt-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.pt-option {
  width: clamp(56px, 16vw, 76px);
  height: clamp(56px, 16vw, 76px);
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 9vw, 2.8rem);
  border-radius: 16px;
  background: #fff;
  border: 3px solid rgba(76, 201, 240, 0.4);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.12);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.pt-option:hover { transform: translateY(-3px); }
.pt-option.is-right { border-color: #06d6a0; background: #e8fff4; }
.pt-option.is-wrong { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }

/* Game 28 — pick the correct colour */
.cp-game { width: min(540px, 100%); margin: 0 auto; text-align: center; }
.cp-card {
  width: min(260px, 74vw);
  margin: 0 auto 16px;
  padding: 22px;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 38%, #ffffff, #eef4ff 72%);
  box-shadow: 0 16px 30px rgba(26, 43, 74, 0.16), inset 0 0 0 4px rgba(255, 255, 255, 0.7);
}
.cp-emoji {
  font-size: clamp(5rem, 24vw, 8.5rem);
  line-height: 1;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.16));
  animation: lmPop 0.5s ease;
}
.cp-question {
  font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  font-weight: 800;
  color: #2a3154;
  margin: 0 0 16px;
}
.cp-question b { color: #e6447f; }
.cp-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.cp-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 14px;
  border: 3px solid rgba(76, 201, 240, 0.35);
  border-radius: 16px;
  background: #fff;
  color: #23405c;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.1);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.cp-option:hover { transform: translateY(-2px); }
.cp-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.12);
  flex: none;
}
.cp-option.is-right { border-color: #06d6a0; background: #e8fff4; color: #067a56; }
.cp-option.is-wrong { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }

/* Game 12 — help find the home / favourite */
.hh-game { width: min(640px, 100%); margin: 0 auto; text-align: center; }
.hh-headline {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 900;
  color: #e6447f;
  margin: 2px 0 14px;
}
.hh-board {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1.2fr) 1fr;
  grid-template-areas:
    "o1 subj o2"
    "o3 subj o4";
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.hh-o1 { grid-area: o1; }
.hh-o2 { grid-area: o2; }
.hh-o3 { grid-area: o3; }
.hh-o4 { grid-area: o4; }
.hh-subject {
  grid-area: subj;
  display: grid;
  place-items: center;
  align-self: stretch;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, #eaf6ff, #ffffff 70%);
}
.hh-subject-emoji {
  font-size: clamp(3.6rem, 16vw, 6.5rem);
  line-height: 1;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.16));
  animation: lmPop 0.5s ease;
}
.hh-option {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border: 3px solid rgba(76, 201, 240, 0.4);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.1);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.3s ease;
}
.hh-option:hover { transform: translateY(-2px); }
.hh-num {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #845ef7;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(132, 94, 247, 0.4);
}
.hh-opt-emoji { font-size: clamp(2.2rem, 9vw, 3.2rem); line-height: 1; }
.hh-opt-label { font-weight: 800; color: #23405c; font-size: 0.9rem; }
.hh-option.is-selected { border-color: #4dabf7; background: #eaf6ff; transform: translateY(-2px); }
.hh-option.is-right { border-color: #06d6a0; background: #e8fff4; }
.hh-option.is-wrong { border-color: #ff5d8f; background: #ffe9f0; animation: lmShake 0.4s ease; }
.hh-option.is-out { opacity: 0.28; pointer-events: none; filter: grayscale(1); }
.hh-answer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hh-answer-label { font-weight: 900; color: #245d87; }
.hh-answer {
  min-width: 180px;
  padding: 12px 14px;
  border: 3px solid #2b6f8a;
  border-radius: 14px;
  background: #fff;
  color: #12b886;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
}
.hh-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hh-btn {
  padding: 13px 26px;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.16);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.hh-btn:hover { transform: translateY(-2px); }
.hh-hint { background: linear-gradient(135deg, #9d6bff, #7048e8); }
.hh-check { background: linear-gradient(135deg, #6ac36a, #4caf50); }
@media (max-width: 520px) {
  .hh-opt-label { font-size: 0.78rem; }
  .hh-board { gap: 8px; }
}

/* Game 26 — famous places (landmark quiz) */
.lm-game { width: min(560px, 100%); margin: 0 auto; text-align: center; }
.lm-postcard {
  position: relative;
  width: min(360px, 86vw);
  margin: 0 auto 16px;
  padding: 16px 16px 12px;
  background: #fffdf6;
  border-radius: 22px;
  border: 3px solid #fff;
  box-shadow: 0 16px 30px rgba(26, 43, 74, 0.16), inset 0 0 0 3px rgba(76, 201, 240, 0.18);
}
.lm-flag { position: absolute; top: 10px; left: 12px; font-size: 1.7rem; }
.lm-stamp {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px dashed #ff9ec4;
  color: #ff5d9e;
  font-size: 1rem;
}
.lm-scene {
  display: grid;
  place-items: center;
  height: clamp(150px, 40vw, 210px);
  border-radius: 16px;
  background: linear-gradient(#cfeeff 0 62%, #cdeeb0 62% 100%);
  overflow: hidden;
}
.lm-emoji {
  font-size: clamp(5rem, 22vw, 8rem);
  line-height: 1;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.18));
  animation: lmPop 0.5s ease;
}
@keyframes lmPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.lm-country {
  margin-top: 10px;
  font-weight: 800;
  color: #245d87;
  letter-spacing: 0.3px;
}
.lm-question {
  font-size: clamp(1.05rem, 4.4vw, 1.4rem);
  font-weight: 800;
  color: #2a3154;
  margin: 0 0 14px;
}
.lm-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.lm-option {
  padding: 14px 12px;
  border: 3px solid rgba(76, 201, 240, 0.35);
  border-radius: 16px;
  background: #fff;
  color: #23405c;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.1);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.lm-option:hover { transform: translateY(-2px); }
.lm-option.is-right { background: #e8fff4; border-color: #06d6a0; color: #067a56; }
.lm-option.is-wrong { background: #ffe9f0; border-color: #ff5d8f; animation: lmShake 0.4s ease; }
@media (max-width: 460px) {
  .lm-options { grid-template-columns: 1fr; }
}

/* Game 13 — name the insect */
body[data-activity-id="13"] .activity-area {
  display: grid;
  place-items: center;
  padding: 18px;
}
.in-game {
  width: min(620px, 100%);
  text-align: center;
}
.in-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.in-badge {
  padding: 7px 12px;
  border: 2px solid rgba(255, 183, 3, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #7a4e00;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.08);
}
.in-card {
  width: min(380px, 90vw);
  margin: 0 auto 14px;
  padding: 18px 16px 16px;
  border: 4px solid #ffb703;
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.95), transparent 28%),
    linear-gradient(150deg, #fff7cc, #d9fff0 52%, #ffe0c2);
  box-shadow: 0 14px 28px rgba(26, 43, 74, 0.14), inset 0 0 0 3px rgba(255,255,255,.7);
}
.in-visual {
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}
.in-visual .item-photo,
.in-visual img {
  width: min(220px, 62vw);
  height: min(220px, 62vw);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(26, 43, 74, 0.14);
}
.in-emoji {
  display: grid;
  place-items: center;
  width: min(180px, 52vw);
  height: min(180px, 52vw);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fff3c4);
  font-size: clamp(4.2rem, 16vw, 6rem);
  box-shadow: inset 0 0 0 3px rgba(255, 183, 3, 0.25);
}
.in-prompt {
  margin: 8px 0 0;
  color: #2a3154;
  font-weight: 800;
  line-height: 1.35;
}
.in-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 2px dashed rgba(117, 76, 224, 0.3);
  border-radius: 14px;
  background: #f6f1ff;
  color: #6246b5;
}
.in-hint span { font-size: .82rem; font-weight: 700; }
.in-hint strong { letter-spacing: .16em; font-size: 1.08rem; }
.in-label {
  display: block;
  margin-bottom: 7px;
  color: #2a3154;
  font-weight: 800;
}
.in-answer-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
}
.in-input {
  min-width: 0;
  text-align: center;
  font-size: 1.2rem;
}
.in-input.is-correct { border-color: #06d6a0; background: #e8fff4; }
.in-input.is-wrong { border-color: #ff5d8f; animation: lmShake .4s ease; }
@media (max-width: 520px) {
  .in-answer-row { flex-direction: column; }
  .in-answer-row .btn { width: 100%; }
}

/* Game 18 — national symbols quiz */
body[data-activity-id="18"] #activity-desc.lead {
  display: none;
}
body[data-activity-id="18"] .activity-area {
  display: grid;
  place-items: center;
  padding: 12px 8px 18px;
}
.sq-game {
  width: min(680px, 100%);
  text-align: center;
}
.sq-clue {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 3px solid rgba(37, 116, 184, 0.28);
  background: linear-gradient(135deg, #e8f4ff, #fff8e7);
  color: #1a2b4a;
  font-weight: 800;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(26, 43, 74, 0.08);
}
.sq-grid {
  gap: 12px;
}
.sq-card .item-emoji {
  background: linear-gradient(145deg, #fff, #eef8ff);
  font-size: clamp(2.6rem, 9vw, 3.6rem);
}

/* Game 5 — count objects and write the number */
body[data-activity-id="5"] .activity-area {
  display: grid;
  place-items: center;
  padding: 16px;
}
.cw-write {
  width: min(760px, 100%);
  text-align: center;
}
.cw-write-head {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.cw-write-badge {
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid rgba(117, 76, 224, 0.3);
  background: rgba(255, 255, 255, 0.92);
  color: #6246b5;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.08);
}
.cw-write-rows {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}
.cw-write-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 3px solid rgba(61, 184, 255, 0.28);
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.9), transparent 30%),
    linear-gradient(135deg, #eef9ff, #fff8e7);
  box-shadow: 0 8px 18px rgba(26, 43, 74, 0.08);
}
.cw-write-row:nth-child(2n) {
  border-color: rgba(6, 214, 160, 0.28);
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.9), transparent 30%),
    linear-gradient(135deg, #eafff5, #fff0f6);
}
.cw-write-objects {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 52px;
}
.cw-write-obj {
  font-size: clamp(1.8rem, 5.5vw, 2.4rem);
  line-height: 1;
}
.cw-write-box {
  flex: 0 0 auto;
}
.cw-write-input {
  width: 72px;
  height: 60px;
  border-radius: 14px;
  border: 3px dashed rgba(26, 43, 74, 0.3);
  background: #fff;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a2b4a;
  box-shadow: inset 0 -3px 0 rgba(26, 43, 74, 0.06);
  cursor: text;
}
.cw-write-input:focus {
  outline: none;
  border-style: solid;
  border-color: #3db8ff;
  box-shadow: 0 0 0 4px rgba(61, 184, 255, 0.2);
}
.cw-write-input.is-correct {
  border-style: solid;
  border-color: #06d6a0;
  background: #e8fff4;
  color: #0f7a40;
}
.cw-write-input.is-wrong {
  border-style: solid;
  border-color: #ff5d8f;
  background: #ffe8ef;
  animation: lmShake 0.4s ease;
}
#cw-write-check {
  margin-top: 4px;
}
@media (max-width: 520px) {
  .cw-write-obj { font-size: 1.5rem; }
  .cw-write-input { width: 58px; height: 52px; font-size: 1.5rem; }
  .cw-write-row { gap: 8px; padding: 8px; }
}

/* Game 20 — even number trail (not a maze) */
body[data-activity-id="20"] .activity-area {
  display: grid;
  place-items: center;
  padding: 16px;
}
.et-game {
  width: min(640px, 100%);
  text-align: center;
}
.et-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.et-badge {
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid rgba(6, 214, 160, 0.35);
  background: rgba(255, 255, 255, 0.92);
  color: #0f7a40;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(26, 43, 74, 0.08);
}
.et-clue {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 3px solid rgba(61, 184, 255, 0.35);
  background: linear-gradient(135deg, #e8fff6, #e8f4ff);
  color: #1a2b4a;
  font-weight: 800;
  line-height: 1.35;
}
.et-trail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  min-height: 52px;
}
.et-slot {
  min-width: 48px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
}
.et-slot.is-empty {
  border: 2px dashed rgba(26, 43, 74, 0.25);
  color: #889;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  text-transform: uppercase;
}
.et-slot.is-filled {
  background: linear-gradient(145deg, #b8f2d4, #06d6a0);
  color: #084c2e;
  border: 2px solid #06d6a0;
  box-shadow: 0 4px 0 rgba(6, 214, 160, 0.35);
}
.et-arrow {
  color: #3db8ff;
  font-weight: 900;
}
.et-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.et-num {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 3px solid rgba(26, 43, 74, 0.12);
  font-size: 1.45rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(26, 43, 74, 0.1);
  transition: transform 0.12s ease;
}
.et-num.is-even {
  background: linear-gradient(145deg, #dff4ff, #4cc9f0);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.et-num.is-decoy {
  background: linear-gradient(145deg, #ffe0e8, #ff8fab);
  color: #fff;
  border-style: dashed;
}
.et-num:hover { transform: translateY(-2px); }
.et-num.is-picked {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}
.et-num.is-decoy-hit {
  animation: lmShake 0.4s ease;
  border-color: #ff5d8f !important;
}
@media (max-width: 520px) {
  .et-num { width: 56px; height: 56px; font-size: 1.25rem; border-radius: 14px; }
}

.counter-display {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 10px 0;
}

.site-footer {
  margin-top: 20px;
  padding: 32px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
}
.footer-brand {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.2rem;
}

.palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.swatch {
  height: 74px;
  border-radius: 16px;
  display: grid;
  place-items: end start;
  padding: 10px;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes slowZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatBlob {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .card-cover-wrap {
    transform: scale(1) !important;
  }
}

/* —— Ads (AdSense-ready placeholders) —— */
body.has-ads { padding-bottom: 84px; }

.ad-slot {
  border: 2px dashed rgba(77, 98, 128, 0.45);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72) 8px, rgba(232, 240, 250, 0.9) 8px, rgba(232, 240, 250, 0.9) 16px);
  border-radius: 16px;
  color: #4d6280;
  font-weight: 800;
  text-align: center;
  padding: 12px;
  margin: 12px 0;
  position: relative;
}
.ad-slot .ad-label {
  position: absolute;
  top: 6px;
  left: 8px;
  background: #35507d;
  color: #fff;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
}
.ad-label-inline {
  position: static;
  display: inline-block;
  margin-bottom: 8px;
}
.ad-slot .ad-body {
  padding-top: 22px;
  font-size: 0.92rem;
  line-height: 1.35;
}
.ad-slot small { font-weight: 700; opacity: 0.85; }

.ad-top-banner {
  width: min(1120px, 92vw);
  margin: 10px auto;
  min-height: 90px;
}

body:not([data-page="activity"]) .page-ad-layout,
body:not([data-page="activity"]) .ad-rail-left,
body:not([data-page="activity"]) .ad-rail-right {
  display: none !important;
}

body[data-page="activity"] .page-ad-layout {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) minmax(120px, 160px);
  gap: 14px;
  width: min(1240px, 96vw);
  margin: 0 auto;
  align-items: start;
}
body[data-page="activity"] .page-ad-main {
  min-width: 0;
}
body[data-page="activity"] .ad-rail-left,
body[data-page="activity"] .ad-rail-right {
  display: block;
  position: sticky;
  top: 88px;
  min-height: 420px;
  margin: 18px 0 0;
}

@media (max-width: 1100px) {
  body[data-page="activity"] .page-ad-layout {
    grid-template-columns: 1fr;
    width: min(1120px, 92vw);
  }
  body[data-page="activity"] .ad-rail-left,
  body[data-page="activity"] .ad-rail-right {
    display: none;
  }
}

.ad-inline { min-height: 110px; grid-column: 1 / -1; }

.ad-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  margin: 0;
  border-radius: 0;
  min-height: 68px;
  border-left: none;
  border-right: none;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(26, 43, 74, 0.08);
}

.ad-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 24, 40, 0.55);
  display: none;
  place-items: center;
  padding: 18px;
}
.ad-modal.show { display: grid; }
.ad-modal-card {
  width: min(420px, 94vw);
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.ad-modal-card h3 {
  margin: 6px 0;
  font-family: var(--font-display);
  color: var(--coral);
}
.ad-modal-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}
.video-fake {
  height: 180px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a2b4a, #3db8ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  margin: 10px 0 14px;
}

/* Game 3 — letter fill */
.letter-fill-stage {
  position: relative;
  width: min(520px, 100%);
  margin: 0 auto 16px;
  min-height: 280px;
  background:
    radial-gradient(circle at 50% 40%, #fff 0%, #f7fbff 55%, #eef6ff 100%);
  border-radius: 22px;
  border: 3px solid rgba(155, 93, 229, 0.22);
  overflow: hidden;
  touch-action: none;
}
.letter-fill-hero {
  position: absolute;
  inset: 18% 22% 22% 22%;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}
.letter-fill-hero .item-photo {
  width: min(200px, 48vw);
  height: min(200px, 48vw);
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 43, 74, 0.12);
}
.letter-fill-floaters {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.letter-fill-chip {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, #ffe56a, #ffc938);
  color: #1a2b4a;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 6px 0 #e0a800, 0 10px 16px rgba(26, 43, 74, 0.16);
  cursor: grab;
  z-index: 3;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.letter-fill-chip.is-picked,
.letter-fill-chip.is-dragging {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 8px 0 #e0a800, 0 14px 22px rgba(26, 43, 74, 0.22);
  z-index: 5;
}
.letter-fill-chip.is-dragging {
  position: fixed;
  margin: 0;
  z-index: 10020;
  transition: none;
  pointer-events: none;
  will-change: left, top;
}
.letter-fill-chip.is-placed {
  position: relative;
  left: auto !important;
  top: auto !important;
  width: 100%;
  height: 100%;
  box-shadow: none;
  background: transparent;
  font-size: 1.35rem;
}
.letter-fill-chip.is-flying {
  transition: left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.letter-fill-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px auto 14px;
  max-width: 520px;
}
.letter-fill-slot {
  width: 48px;
  height: 54px;
  border-radius: 12px;
  border: 2px dashed rgba(26, 43, 74, 0.28);
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  color: #1a2b4a;
}
.letter-fill-slot.is-given {
  border-style: solid;
  border-color: rgba(123, 108, 255, 0.45);
  background: #f3f0ff;
}
.letter-fill-slot.is-filled {
  border-style: solid;
  border-color: #ffc938;
  background: #fff8db;
  padding: 0;
}
.letter-fill-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.lf-action {
  border: 0;
  border-radius: 999px;
  min-width: 108px;
  padding: 12px 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.lf-hint { background: #4cc9f0; }
.lf-clear { background: #06d6a0; }
.lf-check { background: #ff5d8f; }
.lf-speak {
  min-width: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: #ffd60a;
  color: #1a2b4a;
  font-size: 1.15rem;
}

/* Word search / crossword / maze */
.ws-wrap, .cw-layout {
  display: grid;
  gap: 14px;
  justify-content: center;
}
@media (min-width: 760px) {
  .ws-wrap, .cw-layout { grid-template-columns: auto minmax(160px, 220px); align-items: start; }
}
.ws-grid, .cw-grid, .maze-grid {
  display: grid;
  gap: 4px;
  margin: 0 auto;
}
.ws-grid { grid-template-columns: repeat(var(--ws-cols, 8), 34px); touch-action: none; user-select: none; -webkit-user-select: none; }
.cw-grid { grid-template-columns: repeat(var(--cw-cols, 5), 42px); }
.maze-grid { grid-template-columns: repeat(var(--maze-cols, 7), 40px); }
.ws-cell, .cw-cell, .maze-cell, .cw-chip {
  border: 0;
  font-weight: 900;
  color: #1a2b4a;
}
.ws-cell {
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; border: 2px solid rgba(26,43,74,0.15);
  cursor: pointer; touch-action: none; user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.ws-cell.is-selecting { background: #ffe56a; }
.ws-cell.is-found { background: #b8f2d4; border-color: #06d6a0; }
.ws-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ws-words li {
  padding: 8px 12px; border-radius: 999px; background: #eef2ff; font-weight: 800;
}
.ws-words li.is-found { background: #d8f8e7; text-decoration: line-through; opacity: 0.75; }
.cw-cell {
  position: relative; width: 42px; height: 42px; border-radius: 10px;
  border: 2px solid rgba(26,43,74,0.2); background: #fff;
  display: grid; place-items: center; font-size: 1.1rem;
  touch-action: none;
}
.cw-cell.is-block { background: transparent; border-color: transparent; }
.cw-cell.is-given { background: #eafbf2; border-color: #86e3ba; color: #0b8457; }
.cw-cell.is-empty { background: #fff; border-style: dashed; border-color: #b9d6ff; }
.cw-cell.is-filled { background: #fff8db; border-color: #ffc938; }
.cw-cell.is-hint { background: #efe6ff; border-color: #b197fc; }
.cw-cell.cw-drop-hot { background: #d8f8e7; border-color: #06d6a0; }
.cw-num { position: absolute; top: 2px; left: 3px; font-size: 0.62rem; color: #7a86a8; font-weight: 800; }
.cw-tray {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 14px auto 0; padding: 12px;
  max-width: 520px;
  background: linear-gradient(135deg,#eef6ff,#fff2f8);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(76,201,240,0.18);
}
.cw-chip {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 900; color: #7a4f00;
  background: linear-gradient(180deg,#ffe56a,#ffc938); cursor: grab;
  box-shadow: 0 4px 0 #e0a800; touch-action: none;
  transition: transform 0.12s ease;
}
.cw-chip:active { cursor: grabbing; }
.cw-chip.is-picked { transform: scale(1.12); outline: 3px solid #4dabf7; }
.cw-chip.is-dragging { opacity: 0.35; }
.cw-chip.is-placed {
  width: 100%; height: 100%; box-shadow: none; border-radius: 8px;
  background: linear-gradient(180deg,#fff3b0,#ffdd57); color: #7a4f00;
}
.cw-chip.is-locked { cursor: default; background: linear-gradient(180deg,#d9c7ff,#b197fc); color: #37226b; box-shadow: 0 4px 0 #8f6ee0; }
.cw-ghost {
  position: fixed; z-index: 1000; pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 12px; font-size: 1.25rem; font-weight: 900; color: #7a4f00;
  background: linear-gradient(180deg,#ffe56a,#ffc938);
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(224,168,0,0.5);
}
.cw-clues { margin: 0; padding: 12px 12px 12px 30px; font-size: 1.02rem; list-style: none; }
.cw-clues li {
  position: relative; margin-bottom: 8px; padding: 6px 10px;
  background: #fff; border-radius: 12px; box-shadow: 0 3px 8px rgba(26,43,74,0.08);
  font-weight: 700; color: #2a3154;
}
.cw-clues li strong { color: #e6447f; }
.cw2-tip { text-align: center; font-weight: 800; color: #245d87; margin: 0 0 12px; }
.cw-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.cw-btn {
  padding: 12px 22px; border: none; border-radius: 14px;
  font-weight: 900; font-size: 1rem; color: #fff; cursor: pointer;
  box-shadow: 0 6px 14px rgba(26,43,74,0.16);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.cw-btn:hover { transform: translateY(-2px); }
.cw-hint { background: linear-gradient(135deg,#9d6bff,#7048e8); }
.cw-clear { background: linear-gradient(135deg,#8fa2b8,#647a91); }
.cw-check { background: linear-gradient(135deg,#6ac36a,#4caf50); }
.maze-cell {
  width: 40px; height: 40px; border-radius: 10px;
  background: #e8f7ff; border: 2px solid rgba(61,184,255,0.35); cursor: pointer;
}
.maze-cell.is-wall { background: #243552; border-color: #243552; cursor: not-allowed; }
.maze-cell.is-start, .maze-cell.is-end { font-size: 1.05rem; }
.maze-cell.is-visited { background: #ffe9a8; }
.maze-cell.is-here { box-shadow: inset 0 0 0 3px #ff5d8f; }

/* Game 9 — centered, progressively harder adventure maze */
body[data-activity-id="9"] .activity-area {
  display: grid;
  place-items: center;
  padding: 20px;
}
body[data-activity-id="9"] .maze-game-nine {
  width: min(620px, 100%);
  text-align: center;
  margin-inline: auto;
}
body[data-activity-id="9"] .maze-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
body[data-activity-id="9"] .maze-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(123, 108, 255, 0.22);
  color: #2a3154;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(26, 43, 74, 0.08);
}
body[data-activity-id="9"] .maze-frame {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.95), transparent 32%),
    linear-gradient(145deg, #dcfff0, #dff4ff 52%, #fff1c8);
  border: 4px solid #68d6a1;
  box-shadow:
    0 12px 24px rgba(26, 43, 74, 0.15),
    inset 0 0 0 3px rgba(255,255,255,.8);
  overflow: auto;
}
body[data-activity-id="9"] .maze-grid {
  width: max-content;
  grid-template-columns: repeat(var(--maze-cols), var(--maze-cell));
  gap: 3px;
}
body[data-activity-id="9"] .maze-cell {
  width: var(--maze-cell);
  height: var(--maze-cell);
  border-radius: 7px;
  border: 2px solid #b8e5f2;
  background: linear-gradient(145deg, #fff, #e9faff);
  font-size: calc(var(--maze-cell) * .48);
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
}
body[data-activity-id="9"] .maze-cell:not(.is-wall):hover {
  transform: scale(1.06);
  z-index: 2;
}
body[data-activity-id="9"] .maze-cell.is-wall {
  border-color: #315b47;
  background:
    radial-gradient(circle at 30% 25%, #6f9d6f 0 12%, transparent 13%),
    linear-gradient(145deg, #3e7658, #254d3c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
body[data-activity-id="9"] .maze-cell.is-visited {
  border-color: #ffc938;
  background: linear-gradient(145deg, #fff8cc, #ffe56a);
}
body[data-activity-id="9"] .maze-cell.is-here {
  transform: scale(1.08);
  box-shadow: inset 0 0 0 3px #ff5d8f, 0 4px 9px rgba(255,93,143,.3);
  z-index: 3;
}
body[data-activity-id="9"] .maze-cell.is-start {
  border-color: #4cc9f0;
}
body[data-activity-id="9"] .maze-cell.is-end {
  border-color: #ffb703;
  background: #fff4bc;
}
body[data-activity-id="9"] .maze-reset-btn {
  margin-top: 14px;
}
@media (max-width: 520px) {
  body[data-activity-id="9"] .activity-area { padding: 12px 6px; }
  body[data-activity-id="9"] .maze-frame { padding: 7px; border-width: 3px; }
  body[data-activity-id="9"] .maze-grid { gap: 2px; }
}

/* Game 10 — numbered school path (not a wall maze) */
body[data-activity-id="10"] .activity-area {
  display: grid;
  place-items: center;
  padding: 18px;
}
.np-game {
  width: min(580px, 100%);
  margin: 0 auto;
  text-align: center;
}
.np-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.np-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(37, 116, 184, 0.25);
  font-weight: 800;
  color: #1f5f98;
  box-shadow: 0 4px 10px rgba(26, 43, 74, 0.08);
}
.np-board {
  position: relative;
  padding: 16px 14px 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(145deg, #d9fff0, #d9f0ff 48%, #ffe9b0);
  border: 4px solid #3db8ff;
  box-shadow:
    0 14px 28px rgba(26, 43, 74, 0.14),
    inset 0 0 0 3px rgba(255,255,255,.75);
}
.np-road-top,
.np-road-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 10px;
}
.np-road-bottom { margin: 12px 0 8px; }
.np-start, .np-end { font-size: 2rem; line-height: 1; }
.np-road-label {
  font-weight: 800;
  color: #2a3154;
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.86rem;
}
.np-path {
  display: grid;
  grid-template-columns: repeat(var(--np-cols, 5), minmax(48px, 1fr));
  gap: 10px;
  justify-content: center;
}
.np-tile {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 3px solid rgba(26, 43, 74, 0.12);
  font-weight: 900;
  font-size: 1.25rem;
  color: #1a2b4a;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(26, 43, 74, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.np-tile.is-yellow { background: linear-gradient(145deg, #fff8c2, #ffd60a); }
.np-tile.is-blue { background: linear-gradient(145deg, #dff4ff, #4cc9f0); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.np-tile.is-decoy {
  border-style: dashed;
  opacity: 0.92;
}
.np-tile:hover { transform: translateY(-3px); }
.np-tile.is-next-hint {
  animation: npPulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(255, 93, 143, 0.35), 0 6px 0 rgba(26, 43, 74, 0.12);
}
.np-tile.is-done {
  opacity: 0.5;
  box-shadow: none;
  transform: none;
  background: #d8f8e7 !important;
  color: #0f7a40 !important;
  border-color: #06d6a0;
  animation: none;
}
.np-tile.is-wrong {
  animation: lmShake 0.4s ease;
  border-color: #ff5d8f !important;
}
.np-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  overflow: hidden;
  border: 1px solid rgba(26,43,74,.08);
}
.np-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #06d6a0, #4cc9f0, #ffd60a);
  transition: width 0.25s ease;
}
#np-reset { margin-top: 14px; }
@keyframes npPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (max-width: 520px) {
  .np-path { gap: 7px; grid-template-columns: repeat(var(--np-cols, 4), minmax(40px, 1fr)); }
  .np-tile { font-size: 1.08rem; border-radius: 13px; }
  .np-start, .np-end { font-size: 1.6rem; }
}

/* Game 10 (v2) — drag the missing numbers into the winding path */
.np2-game { position: relative; width: min(680px, 100%); margin: 0 auto; text-align: center; }
.np2-headline {
  font-size: clamp(1.05rem, 4.6vw, 1.55rem);
  font-weight: 900;
  color: #e6447f;
  margin: 2px 0 8px;
}
.np2-point {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: #2a3154;
  background: #fff;
  border-radius: 999px;
  padding: 5px 16px;
  box-shadow: 0 5px 12px rgba(26, 43, 74, 0.12);
  border: 2px solid rgba(61, 184, 255, 0.25);
}
.np2-startbar { margin: 2px auto 6px; color: #0e8a5f; border-color: rgba(6, 214, 160, 0.4); }
.np2-finishbar { margin: 6px auto 2px; color: #e6447f; border-color: rgba(255, 93, 143, 0.4); }
.np2-point-label { letter-spacing: 1px; }
.np2-arrow {
  font-size: 1.15rem;
  line-height: 1;
  animation: np2Bounce 1.1s ease-in-out infinite;
}
.np2-startbar .np2-arrow { color: #06d6a0; }
.np2-finishbar .np2-arrow { color: #ff5d8f; }
@keyframes np2Bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
.np2-emoji { font-size: 1.8rem; line-height: 1; }
.np2-finish-emoji.np2-cheer { animation: np2Cheer 0.9s ease; }
@keyframes np2Cheer {
  0% { transform: scale(1); }
  30% { transform: scale(1.5) rotate(-10deg); }
  60% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1); }
}
.np2-flyer {
  position: absolute;
  z-index: 30;
  font-size: 2.4rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(26, 43, 74, 0.28));
}
.np2-flyer.is-going {
  transition: left 1.15s cubic-bezier(0.45, 0, 0.35, 1), top 1.15s cubic-bezier(0.3, -0.2, 0.5, 1);
}
.np2-arena {
  position: relative;
  padding: 60px 54px;
  margin: 6px auto 0;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,.85), transparent 30%),
    linear-gradient(145deg, #eafff6, #eaf4ff 50%, #fff4d9);
  border: 3px solid rgba(61, 184, 255, 0.4);
  overflow: hidden;
}
.np2-board {
  display: grid;
  grid-template-columns: repeat(var(--np2-cols), 1fr);
  grid-template-rows: repeat(var(--np2-rows), 1fr);
  gap: 8px;
  width: min(440px, 100%);
  margin: 0 auto;
}
.np2-tile,
.np2-slot {
  aspect-ratio: 1;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: clamp(1rem, 4.4vw, 1.5rem);
}
.np2-tile {
  color: #10314a;
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 0 rgba(26, 43, 74, 0.14);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.np2-slot {
  border: 3px dashed #ff9db8;
  background: rgba(255, 255, 255, 0.7);
}
.np2-slot.is-filled {
  border-style: solid;
  border-color: #ffc938;
  background: #fff8db;
}
.np2-slot.is-right { border-color: #06d6a0; background: #e8fff4; }
.np2-slot.is-wrong { border-color: #ff5d8f; background: #ffe8ef; animation: np2Wrong 0.45s ease; }
@keyframes np2Wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.np2-chip {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #ffe08a);
  box-shadow: 0 5px 0 #e0a800;
  font-weight: 900;
  font-size: 1.25rem;
  color: #7a4b00;
  cursor: grab;
  z-index: 3;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: grid;
  place-items: center;
}
.np2-chip.is-picked { outline: 3px solid #7b6cff; }
.np2-chip.is-dragging { opacity: 0.35; }
.np2-chip.is-flying { transition: left 0.35s ease, top 0.35s ease, transform 0.35s ease; }
.np2-chip.is-placed {
  position: static;
  width: 100%;
  height: 100%;
  box-shadow: none;
  background: linear-gradient(145deg, #fff8c2, #ffd60a);
  color: #10314a;
  border-radius: 12px;
}
.np2-chip-ghost {
  position: fixed;
  z-index: 9999;
  width: 50px;
  height: 50px;
  transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(224, 168, 0, 0.5);
}
@media (max-width: 520px) {
  .np2-arena { padding: 54px 40px; }
  .np2-board { gap: 6px; }
  .np2-chip, .np2-chip-ghost { width: 42px; height: 42px; font-size: 1.1rem; }
}

/* Game 6 — missing picture piece */
.mp-board {
  width: min(420px, 92vw);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  padding: 10px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #eefaff);
  border: 3px solid rgba(76, 201, 240, 0.35);
  box-shadow: 0 12px 26px rgba(26, 43, 74, 0.12);
  overflow: hidden;
}
.mp-board-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}
.mp-board.is-complete {
  border-color: #06d6a0;
  animation: gamePop 0.35s ease;
}
.mp-board.is-unmatched {
  animation: lmShake 0.45s ease;
}
.mp-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 126px));
  justify-content: center;
  gap: 14px;
}
.mp-option {
  position: relative;
  aspect-ratio: 1;
  border: 3px solid rgba(123, 108, 255, 0.32);
  border-radius: 18px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 7px 0 rgba(26, 43, 74, 0.09);
  overflow: visible;
}
.mp-option .item-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.mp-number {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #7b6cff;
  font-weight: 900;
  box-shadow: 0 4px 9px rgba(26, 43, 74, 0.18);
}
.mp-option.correct {
  border-color: #06d6a0;
  background: #e8fff4;
}
.mp-option.is-emptied {
  background: #fff;
  border-color: rgba(6, 214, 160, 0.4);
}
.mp-option.is-emptied .item-photo {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mp-option.wrong {
  border-color: #ff5d8f;
  background: #ffe8ef;
  animation: mpWrong 0.5s ease;
}
@keyframes mpWrong {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-4deg); }
  40% { transform: translateX(7px) rotate(4deg); }
  60% { transform: translateX(-5px) rotate(-3deg); }
  80% { transform: translateX(5px) rotate(3deg); }
}
.mp-flyer {
  position: fixed;
  z-index: 9999;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(26, 43, 74, 0.28);
  pointer-events: none;
  transition: left 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
    top 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
    width 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (max-width: 520px) {
  .mp-options { gap: 8px; }
  .mp-option { padding: 5px; border-radius: 14px; }
}

/* Game 7 — alphabet missing letters */
.ag-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(48px, 66px));
  gap: 8px;
  justify-content: center;
  margin: 0 auto 16px;
  max-width: 460px;
}
.ag-cell {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid #4cc9f0;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #1a2b4a;
  overflow: hidden;
}
.ag-cell.is-gap {
  padding: 4px;
  background: #f7fbff;
}
.ag-cell .item-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ag-emoji { font-size: 1.35rem; line-height: 1; }
.ag-cell.is-revealed {
  background: #e8fff4;
  border-color: #06d6a0;
}
.ag-answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 640px;
  margin: 0 auto 14px;
}
.ag-answer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.ag-answer-icon {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  border: 3px solid rgba(123,108,255,0.35);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
  box-shadow: 0 6px 16px rgba(123,108,255,0.14);
}
.ag-answer-icon .item-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ag-answer-icon .ag-emoji { font-size: 3rem; }
.ag-slot {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 3px dashed rgba(26,43,74,0.28);
  background: #fff;
  display: grid;
  place-items: center;
}
.ag-slot.is-empty { border-color: #4cc9f0; }
.ag-slot.is-filled {
  border-style: solid;
  border-color: #ffc938;
  background: #fff8db;
}
.ag-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 0;
}
.ag-chip {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe56a, #ffc938);
  font-weight: 900;
  font-size: 1.25rem;
  color: #1a2b4a;
  cursor: grab;
  box-shadow: 0 5px 0 #e0a800;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ag-chip.is-picked { transform: scale(1.08); outline: 3px solid #7b6cff; }
.ag-chip.is-dragging { opacity: 0.35; }
.ag-chip.is-placed {
  width: 100%;
  height: 100%;
  box-shadow: none;
  background: linear-gradient(180deg, #ffe56a, #ffc938);
  border-radius: 12px;
  cursor: grab;
}
.ag-chip-ghost {
  position: fixed;
  z-index: 9999;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(224,168,0,0.45);
}
@media (max-width: 520px) {
  .ag-grid { grid-template-columns: repeat(6, minmax(36px, 48px)); gap: 5px; }
  .ag-cell { font-size: 0.95rem; }
  .ag-answer-icon { width: 78px; height: 78px; }
  .ag-slot { width: 60px; height: 60px; }
}

/* Game 22 — complete the scene (emoji jigsaw) */
.sc-board {
  display: grid;
  grid-template-columns: repeat(var(--sc-cols, 4), 1fr);
  gap: 6px;
  width: min(460px, 100%);
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(160deg, #eafaff, #fef4ff);
  border: 3px solid rgba(123, 108, 255, 0.22);
}
.sc-tile,
.sc-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: clamp(1.4rem, 7vw, 2.2rem);
  line-height: 1;
}
.sc-tile {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(26, 43, 74, 0.05);
}
.sc-slot {
  border: 3px dashed #4cc9f0;
  background: repeating-linear-gradient(45deg, #f4f9ff, #f4f9ff 8px, #e7f2ff 8px, #e7f2ff 16px);
}
.sc-slot.is-filled {
  border-style: solid;
  border-color: #ffc938;
  background: #fff8db;
}
.sc-slot.is-right {
  border-color: #06d6a0;
  background: #e8fff4;
}
.sc-slot.is-wrong {
  border-color: #ff5d8f;
  background: #ffe8ef;
  animation: scWrong 0.5s ease;
}
@keyframes scWrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.sc-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 2px dashed rgba(123, 108, 255, 0.3);
  max-width: 460px;
  margin: 0 auto;
}
.sc-piece {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #eef3ff);
  box-shadow: 0 5px 0 #c9d4f0;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sc-piece.is-picked { outline: 3px solid #7b6cff; transform: scale(1.06); }
.sc-piece.is-dragging { opacity: 0.35; }
.sc-piece.is-placed {
  width: 100%;
  height: 100%;
  box-shadow: none;
  background: transparent;
  border-radius: 12px;
}
.sc-piece-ghost {
  position: fixed;
  z-index: 9999;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(26, 43, 74, 0.28);
}

/* Game 4 — straight line match */
.line-match-board {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 12px 8px;
  background: #fff;
  border-radius: 22px;
  border: 3px solid rgba(155, 93, 229, 0.2);
  overflow: hidden;
}
.line-match-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.line-match-svg line.is-temp {
  stroke-dasharray: 6 6;
  opacity: 0.85;
}
.line-match-cols {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  align-items: start;
}
.line-match-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 84px;
}
.lm-card.lm-right {
  justify-content: flex-start;
}
.lm-flash {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  border: 3px solid var(--lm-color, #7b6cff);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.1);
  flex: 0 0 auto;
}
.lm-flash .item-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.lm-flash.is-shadow {
  background: #f3f5f8;
}
.lm-flash.is-name-only {
  width: auto;
  min-width: 110px;
  padding: 0 14px;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  background: var(--lm-color, #7b6cff);
  border-color: transparent;
}
.lm-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(26, 43, 74, 0.15);
  cursor: crosshair;
  flex: 0 0 auto;
  padding: 0;
  touch-action: none;
}
.lm-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
}
.lm-card.is-matched .lm-flash {
  box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.35), 0 6px 14px rgba(26, 43, 74, 0.1);
}
.lm-card.is-unmatched {
  animation: lmShake 0.45s ease;
}
@keyframes lmShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-1deg); }
  40% { transform: translateX(6px) rotate(1deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@media (max-width: 640px) {
  .letter-fill-chip { width: 42px; height: 42px; font-size: 1.1rem; }
  .letter-fill-slot { width: 42px; height: 48px; }
  .lm-flash { width: 64px; height: 64px; }
  .line-match-cols { gap: 12px 14px; }
  .lf-action { min-width: 92px; padding: 10px 12px; font-size: 0.92rem; }
}

@media (max-width: 1100px) {
  .page-ad-layout {
    grid-template-columns: 1fr;
    width: min(1120px, 92vw);
  }
  .ad-rail-left,
  .ad-rail-right { display: none; }
}

@media (max-width: 760px) {
  .footer-grid, .palette { grid-template-columns: 1fr 1fr; }
  .nav { flex-direction: column; align-items: flex-start; }
  .hero { min-height: 78vh; }
  .hero-content { padding: 36px 0 56px; }
  .section { padding: 40px 0; }
  .ad-top-banner { width: 92vw; min-height: 72px; }
}

/* ---------- Game 49: Memory Match ---------- */
.mm { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mm-headline {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 800;
  color: #4b3aa8;
  text-align: center;
  margin: 0;
}
.mm-stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.mm-stat {
  background: #fff;
  border: 2px solid #e7e2ff;
  border-radius: 14px;
  padding: 6px 16px;
  font-weight: 700;
  color: #6b6597;
  font-size: 15px;
  box-shadow: 0 3px 0 #e7e2ff;
}
.mm-stat b { color: #4b3aa8; margin-left: 4px; }
.mm-grid {
  display: grid;
  gap: 12px;
  width: min(560px, 94vw);
}
.mm-card {
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(30px, 8vw, 54px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}
.mm-card.face-down {
  background: linear-gradient(160deg, #7cb8ff, #4f8ff0);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12), 0 4px 0 #2f6fd0;
  color: rgba(255, 255, 255, 0.9);
}
.mm-card.face-down:hover { transform: translateY(-2px); }
.mm-back {
  font-size: clamp(28px, 7vw, 46px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
}
.mm-card.open {
  background: #fff7dd;
  box-shadow: inset 0 0 0 3px #ffd66b, 0 4px 0 #f0c34a;
  animation: mm-flip 0.25s ease;
}
.mm-card.matched {
  background: #e6f9e8;
  box-shadow: inset 0 0 0 3px #7ad48a, 0 4px 0 #56b869;
  cursor: default;
}
.mm-card .mm-emoji { line-height: 1; }
.mm-card .item-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.mm-card.mm-shake {
  background: #ffe3e3;
  box-shadow: inset 0 0 0 3px #ff8f8f, 0 4px 0 #e06565;
  animation: mm-shake 0.4s ease;
}
@keyframes mm-flip {
  from { transform: rotateY(90deg) scale(0.9); }
  to { transform: rotateY(0) scale(1); }
}
@keyframes mm-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---------- Game 53: Picture Maths ---------- */
.pa { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pa-title {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 800;
  color: #4b3aa8;
  text-align: center;
  margin: 0 0 4px;
}
.pa-rows { display: flex; flex-direction: column; gap: 14px; width: min(620px, 96vw); }
.pa-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.8vw, 16px);
  background: #fbf7ef;
  border: 2px solid #efe7d6;
  border-radius: 18px;
  padding: 12px clamp(8px, 2vw, 18px);
  box-shadow: 0 3px 0 #e7ddc7;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pa-row.is-active {
  border-color: #ffcf5c;
  box-shadow: 0 3px 0 #f0bd3f, 0 0 0 3px rgba(255, 207, 92, 0.35);
}
.pa-index {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8b5cf6;
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 0 #6f45d1;
}
.pa-obj {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 11vw, 74px);
  height: clamp(52px, 11vw, 74px);
}
.pa-emoji { font-size: clamp(38px, 9vw, 60px); line-height: 1; }
.pa-badge {
  position: absolute;
  left: 50%; top: 54%;
  transform: translate(-50%, -50%);
  min-width: 30px;
  padding: 2px 8px;
  background: #ffffff;
  border: 2px solid #4b3aa8;
  border-radius: 10px;
  font-weight: 800;
  font-size: clamp(15px, 3.4vw, 20px);
  color: #2b2350;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}
.pa-op, .pa-eq {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 900;
  color: #6d4bd0;
}
.pa-ans {
  min-width: clamp(52px, 12vw, 78px);
  height: clamp(52px, 12vw, 74px);
  border: 3px dashed #b9aee6;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #f6f3ff;
}
.pa-ans.is-active {
  border-color: #ffb43f;
  background: #fff6e2;
  animation: pa-pulse 1.1s ease-in-out infinite;
}
.pa-ans.is-filled {
  border-style: solid;
  border-color: #7ad48a;
  background: #e6f9e8;
}
.pa-q { font-size: clamp(22px, 5vw, 32px); font-weight: 800; color: #b3a9d6; }
.pa-total { font-size: clamp(22px, 5vw, 32px); font-weight: 900; color: #2f9e46; }
.pa-ans.pa-shake { animation: mm-shake 0.4s ease; border-color: #ff8f8f; background: #ffe3e3; }
.pa-choose {
  margin: 6px 0 0;
  font-weight: 800;
  color: #6b6597;
  font-size: clamp(15px, 2.4vw, 19px);
}
.pa-options { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pa-opt {
  min-width: 68px;
  padding: 12px 18px;
  border: none;
  border-radius: 16px;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(160deg, #7cb8ff, #4f8ff0);
  box-shadow: 0 4px 0 #2f6fd0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
}
.pa-opt:nth-child(4n+1) { background: linear-gradient(160deg, #ff9fc0, #f06a9b); box-shadow: 0 4px 0 #d24d7e; }
.pa-opt:nth-child(4n+2) { background: linear-gradient(160deg, #ffce7a, #f2a63d); box-shadow: 0 4px 0 #d6852a; }
.pa-opt:nth-child(4n+3) { background: linear-gradient(160deg, #9be08a, #63c463); box-shadow: 0 4px 0 #47a94b; }
.pa-opt:active { transform: translateY(2px); box-shadow: 0 2px 0 #2f6fd0; }
.pa-opt.is-right { background: linear-gradient(160deg, #9be08a, #4fbf63) !important; box-shadow: 0 4px 0 #3b9e4c !important; }
.pa-opt.is-wrong { background: linear-gradient(160deg, #ff8f8f, #e05656) !important; box-shadow: 0 4px 0 #c23f3f !important; animation: mm-shake 0.4s ease; }
.pa-opt:disabled { cursor: default; opacity: 0.55; }
.pa-opt.is-right:disabled { opacity: 1; }
@keyframes pa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 180, 63, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 180, 63, 0); }
}

/* ---------- Game 56: Word Connect ---------- */
.wc2 {
  --wc-accent: #7b3ff2;
  --wc-accent-dark: #5a25c4;
  --wc-soft: #efe7ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.wc2-grid {
  display: grid;
  gap: clamp(3px, 1vw, 6px);
  width: min(460px, 92vw);
  justify-content: center;
  margin: 0 auto;
}
.wc2-cell {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}
.wc2-cell.is-gap { background: transparent; }
.wc2-cell.is-box {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--wc-soft);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(0.9rem, 3.6vw, 1.4rem);
  color: #fff;
}
.wc2-cell.is-filled {
  background: var(--wc-accent);
  border-color: var(--wc-accent-dark);
  box-shadow: 0 4px 0 var(--wc-accent-dark);
  color: #fff;
}
.wc2-pop { animation: wc2-pop 0.3s ease both; }
@keyframes wc2-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.wc2-current {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.wc2-current.show { opacity: 1; }
.wc2-current span {
  background: var(--wc-accent);
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  letter-spacing: 2px;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--wc-accent-dark);
}
.wc2-current.wc2-bad span { background: #e05656; box-shadow: 0 3px 0 #b53f3f; animation: mm-shake 0.4s ease; }
.wc2-current.wc2-known span { opacity: 0.7; }
.wc2-wheel {
  position: relative;
  width: min(360px, 92vw);
  height: min(360px, 92vw);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 4px solid var(--wc-soft);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  margin-top: 6px;
}
.wc2-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.wc2-letter {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(52px, 14vw, 70px);
  height: clamp(52px, 14vw, 70px);
  border-radius: 50%;
  border: none;
  background: var(--wc-accent);
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 4px 0 var(--wc-accent-dark);
  transition: transform 0.1s ease;
  touch-action: none;
}
.wc2-letter.is-active {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--wc-accent-dark);
}

/* ---------- Game 57: Cross Maths ---------- */
.cm { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.cm-title {
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 800;
  color: #4b3aa8;
  text-align: center;
  margin: 0;
}
.cm-grid {
  display: grid;
  gap: clamp(2px, 0.8vw, 5px);
  width: min(560px, 96vw);
  justify-content: center;
}
.cm-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(0.8rem, 3.2vw, 1.25rem);
  border-radius: 6px;
}
.cm-cell.cm-gap { background: transparent; }
.cm-num, .cm-op {
  background: #fdf3d3;
  box-shadow: inset 0 0 0 1px #e7d9a6;
  color: #3a3320;
}
.cm-op { color: #6b5a2a; }
.cm-eq { color: #8a6d2a; }
.cm-given { color: #2b2510; }
.cm-blank { background: #fffdf6; box-shadow: inset 0 0 0 2px #e7d9a6; padding: 0; }
.cm-blank input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 800;
  font-size: clamp(0.85rem, 3.4vw, 1.3rem);
  color: #d1622a;
  outline: none;
  padding: 0;
  border-radius: 6px;
}
.cm-blank input:focus { background: #fff7e0; box-shadow: inset 0 0 0 2px #f2c14a; }
.cm-blank.cm-right { background: #e6f9e8; box-shadow: inset 0 0 0 2px #7ad48a; }
.cm-blank.cm-right input { color: #2f9e46; }
.cm-blank.cm-wrong { background: #ffe3e3; box-shadow: inset 0 0 0 2px #ff8f8f; animation: mm-shake 0.4s ease; }
.cm-blank.cm-wrong input { color: #e05656; }
.cm-cell.cm-done { box-shadow: inset 0 0 0 2px #7ad48a; }

/* ---------- Game 58: Maths Car Race ---------- */
.cr { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.cr-q {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 3px solid #ffd66b;
  border-radius: 16px;
  padding: 8px 24px;
  font-size: clamp(1.3rem, 5vw, 2rem);
  font-weight: 900;
  color: #e8730c;
  box-shadow: 0 4px 0 #f0c34a;
  min-height: 52px;
}
.cr-q .cr-op { color: #7a5cc4; }
.cr-q .cr-qmark { color: #b3a9d6; }
.cr-win { color: #2f9e46; font-size: clamp(1.1rem, 4.4vw, 1.6rem); }
.cr-lose { color: #c92a2a; font-size: clamp(1.1rem, 4.4vw, 1.6rem); }
.cr-track {
  position: relative;
  width: min(760px, 96vw);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #8fd0ff 0%, #a9dbff 18%, transparent 18%),
    repeating-linear-gradient(180deg, #6d6f78 0 2px, #797b85 2px 4px);
  background-color: #74767f;
  padding: 8px 0 10px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.15);
}
.cr-finish {
  position: absolute;
  top: 0; bottom: 0;
  right: 6%;
  width: 14px;
  background-image:
    linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%),
    linear-gradient(45deg, #000 25%, #fff 25%, #fff 75%, #000 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
  background-color: #fff;
  z-index: 1;
  opacity: 0.9;
}
.cr-lane {
  position: relative;
  height: clamp(48px, 12vw, 74px);
  border-bottom: 2px dashed rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
}
.cr-lane:last-child { border-bottom: none; }
.cr-car {
  position: absolute;
  left: 3%;
  top: 50%;
  /* Emoji cars face left by default; flip so they drive toward the finish (right). */
  transform: translateY(-50%) scaleX(-1);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,0.25));
  will-change: left;
}
.cr-car.cr-opp { transition: none; }
.cr-car.cr-player { transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.cr-car-face { display: inline-block; line-height: 1; }
.cr-you {
  position: absolute;
  left: 50%;
  top: -0.55em;
  /* Counter-flip so YOU stays readable after the car faces right. */
  transform: translateX(-50%) scaleX(-1);
  font-size: 0.32em;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #ff922b, #f76707);
  border-radius: 999px;
  padding: 0.12em 0.45em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.cr-car.cr-zoom { animation: cr-zoom 0.4s ease; }
@keyframes cr-zoom {
  0% { transform: translateY(-50%) scaleX(-1) scale(1); }
  50% { transform: translateY(-60%) scaleX(-1) scale(1.18); }
  100% { transform: translateY(-50%) scaleX(-1) scale(1); }
}
.cr-car.cr-winner { animation: cr-bounce 0.6s ease infinite alternate; }
.cr-car.cr-lost { filter: grayscale(0.35) drop-shadow(0 3px 3px rgba(0,0,0,0.25)); opacity: 0.85; }
@keyframes cr-bounce {
  from { transform: translateY(-50%) scaleX(-1) scale(1); }
  to { transform: translateY(-62%) scaleX(-1) scale(1.12); }
}
/* Car selection (before race) — same circular option style as answer buttons */
.cr-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  padding: 8px 6px 4px;
}
.cr-pick-title {
  margin: 0;
  font-size: clamp(1.25rem, 4.5vw, 1.7rem);
  font-weight: 900;
  color: #e8730c;
  text-align: center;
}
.cr-pick-sub {
  margin: 0;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  font-weight: 700;
  color: #6b6b8a;
  text-align: center;
  line-height: 1.35;
}
.cr-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 6px;
}
.cr-pick-btn {
  width: 74px;
  height: 74px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #ffe08a, #f2b736);
  box-shadow: 0 5px 0 #d6942a;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cr-pick-btn:hover { transform: translateY(-2px); }
.cr-pick-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #d6942a; }
.cr-pick-emoji {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  line-height: 1;
  display: inline-block;
  /* Match race facing (toward finish / right) */
  transform: scaleX(-1);
}
.cr-options { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cr-opt {
  min-width: 74px;
  height: 74px;
  border: none;
  border-radius: 50%;
  font-size: clamp(1.3rem, 5vw, 1.9rem);
  font-weight: 900;
  color: #7a4a00;
  cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #ffe08a, #f2b736);
  box-shadow: 0 5px 0 #d6942a;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cr-opt:disabled { opacity: 0.55; cursor: default; }
.cr-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #d6942a; }
.cr-opt.cr-wrong {
  background: radial-gradient(circle at 50% 35%, #ff9f9f, #e05656);
  box-shadow: 0 5px 0 #b53f3f;
  color: #fff;
  animation: mm-shake 0.4s ease;
}
.cr-tip {
  margin: 0;
  text-align: center;
  font-size: clamp(0.82rem, 2.8vw, 0.98rem);
  font-weight: 700;
  color: #6b6b8a;
  max-width: 520px;
  line-height: 1.35;
}
.cr-over {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 40, 0.58);
  backdrop-filter: blur(2px);
}
.cr-over[hidden] { display: none !important; }
.cr-over-box {
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  text-align: center;
  max-width: min(86%, 320px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.28);
  animation: cr-over-pop 0.35s cubic-bezier(0.2, 1.2, 0.3, 1);
}
@keyframes cr-over-pop {
  from { transform: scale(0.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cr-over-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 900;
  color: #c92a2a;
}
.cr-over-sub {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5c5f7a;
  line-height: 1.35;
}
.cr-over-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6b6b, #e03131);
  box-shadow: 0 6px 16px rgba(224, 49, 49, 0.35);
}
.cr-over-btn:active { transform: scale(0.96); }

/* ---------- Game 59: Fishing Adventure ---------- */
.fc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.fc-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
  width: min(760px, 96vw);
  padding: 0 4px 4px;
}
.fc-bubble {
  justify-self: start;
  background: #fff;
  border: 3px solid #ffd66b;
  border-radius: 18px;
  padding: 6px 18px;
  font-size: clamp(1.2rem, 4.6vw, 1.7rem);
  font-weight: 900;
  color: #e8730c;
  box-shadow: 0 3px 0 #f0c34a;
  position: relative;
}
.fc-bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 3px solid #ffd66b;
  border-bottom: 3px solid #ffd66b;
  transform: rotate(45deg);
}
.fc-score {
  background: #e2f3ff;
  border: 2px solid #b8def5;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: #2f7bb0;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
}
.fc-hud-right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  align-self: center;
}
.fc-lives {
  background: #ffe8e8;
  border: 2px solid #ffc9c9;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  color: #c92a2a;
  font-size: clamp(0.82rem, 2.8vw, 0.98rem);
}
.fc-bucket-wrap {
  display: flex;
  justify-content: center;
}
.fc-bucket {
  position: relative;
  width: clamp(84px, 22vw, 110px);
  height: clamp(78px, 20vw, 100px);
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(180deg, #cfd8e3 0%, #8b9bb0 100%);
  border: 3px solid #6b7c91;
  box-shadow: 0 8px 16px rgba(30, 58, 90, 0.22);
  overflow: hidden;
}
.fc-bucket-rim {
  position: absolute;
  top: -6px;
  left: -8%;
  width: 116%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8eef5, #9aa9bc);
  border: 2px solid #6b7c91;
  z-index: 3;
}
.fc-bucket-water {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 8%;
  height: 58%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.85), rgba(14, 116, 184, 0.95));
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.35);
}
.fc-bucket-fish {
  position: absolute;
  inset: 18% 8% 10%;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  justify-content: center;
  gap: 2px;
  z-index: 2;
  pointer-events: none;
}
.fc-stored {
  font-size: clamp(0.95rem, 3.2vw, 1.25rem);
  line-height: 1;
  animation: fc-store-pop 0.35s ease both;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
@keyframes fc-store-pop {
  from { transform: scale(0.4) translateY(-8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.fc-bucket-label {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  color: #1e3a5f;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 1px 6px;
  z-index: 4;
  white-space: nowrap;
}
.fc-bucket.fc-bucket-splash {
  animation: fc-splash 0.45s ease;
}
@keyframes fc-splash {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.08) rotate(-2deg); }
  70% { transform: scale(1.04) rotate(2deg); }
}
.fc-water {
  position: relative;
  width: min(760px, 96vw);
  height: clamp(300px, 56vw, 420px);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #7fd0f5 0%, #3aa9e0 45%, #1f8dc9 100%);
  box-shadow: inset 0 8px 20px rgba(255, 255, 255, 0.25), inset 0 -10px 24px rgba(0, 0, 0, 0.15);
}
.fc-water::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.10) 0 3px, transparent 3px 26px);
  pointer-events: none;
}
.fc-fish {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fc-swim var(--swim-dur, 3.5s) ease-in-out var(--swim-delay, 0s) infinite;
  z-index: 1;
  will-change: left, top, transform;
}
.fc-fish:disabled { pointer-events: none; opacity: 0.55; }
.fc-fish.fc-enter {
  animation: fc-enter 0.55s ease both;
}
.fc-fish.fc-enter.fc-swimming {
  animation: fc-swim var(--swim-dur, 3.5s) ease-in-out var(--swim-delay, 0s) infinite;
}
@keyframes fc-enter {
  from { transform: translate(-50%, 40%) scale(0.4); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.fc-fish.fc-picked {
  animation: none;
  pointer-events: none;
}
.fc-fish-emoji {
  font-size: clamp(3rem, 12vw, 4.6rem);
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}
.fc-fish-num {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: clamp(0.9rem, 3.4vw, 1.2rem);
  color: #2b3a67;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  padding: 0 4px;
}
@keyframes fc-swim {
  0% { transform: translate(-50%, -50%) translate(0, 0) rotate(-6deg); }
  25% { transform: translate(-50%, -50%) translate(18px, -14px) rotate(5deg); }
  50% { transform: translate(-50%, -50%) translate(-16px, 12px) rotate(-4deg); }
  75% { transform: translate(-50%, -50%) translate(14px, 10px) rotate(6deg); }
  100% { transform: translate(-50%, -50%) translate(0, 0) rotate(-6deg); }
}
.fc-fish.fc-miss { animation: mm-shake 0.4s ease; }
.fc-fly-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.65s ease;
  filter: drop-shadow(0 8px 12px rgba(20, 60, 100, 0.35));
}
.fc-fly-ghost .fc-fish-emoji {
  font-size: clamp(2.4rem, 10vw, 3.6rem);
}
.fc-over {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 40, 70, 0.45);
  border-radius: 18px;
}
.fc-over[hidden] { display: none !important; }
.fc-over-box {
  background: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  text-align: center;
  max-width: min(86%, 320px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  animation: fc-over-pop 0.4s cubic-bezier(0.2, 1.2, 0.3, 1);
}
@keyframes fc-over-pop {
  from { transform: scale(0.78); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.fc-over-star {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  background: #ffd43b;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 6px 12px rgba(255, 180, 40, 0.45));
  animation: fc-star-spin 1.2s ease-in-out infinite;
}
@keyframes fc-star-spin {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(8deg); }
}
.fc-over-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 900;
  color: #157a42;
}
.fc-over-sub {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b6280;
  line-height: 1.35;
}
.fc-over-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #37b24d, #2b8a3e);
  box-shadow: 0 8px 18px rgba(43, 138, 62, 0.35);
}
.fc-over-btn:active { transform: scale(0.96); }
.fc-over-title-lose { color: #c92a2a !important; }
.fc-over-btn-lose {
  background: linear-gradient(135deg, #ff6b6b, #e03131) !important;
  box-shadow: 0 8px 18px rgba(224, 49, 49, 0.35) !important;
}

@media (max-width: 560px) {
  .fc-top {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "bucket bucket"
      "q score";
    align-items: center;
  }
  .fc-bucket-wrap { grid-area: bucket; }
  .fc-bubble { grid-area: q; justify-self: start; }
  .fc-hud-right { grid-area: score; justify-self: end; }
}

/* ===== Game 60: Balloon Pop ===== */
.bp {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bp-hud {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bp-target {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}
.bp-ring {
  width: 100%;
  height: 100%;
}
.bp-ring-bg {
  fill: #eef3fb;
  stroke: #d8e2f2;
  stroke-width: 4;
}
.bp-ring-fg {
  fill: none;
  stroke: #37a35a;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}
.bp-target-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #2b3a55;
}
.bp-instr {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #2b3a55;
}
.bp-sky {
  position: relative;
  height: min(62vh, 460px);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(#bfe6ff, #e9f7ff 62%),
    linear-gradient(#8fd36b, #8fd36b);
  background-size: 100% 72%, 100% 28%;
  background-position: top, bottom;
  background-repeat: no-repeat;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.06);
}
.bp-balloon {
  position: absolute;
  top: 105%;
  transform: translateX(-50%);
  width: clamp(56px, 12vw, 84px);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  animation-name: bp-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  -webkit-tap-highlight-color: transparent;
}
.bp-balloon-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 0.86 / 1;
  border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 34% 28%, #ffffffcc, transparent 42%), #4f8ff0;
  box-shadow: inset -6px -8px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
}
.bp-balloon-label {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
}
.bp-balloon-knot {
  display: block;
  width: 10px;
  height: 10px;
  margin: -2px auto 0;
  border-radius: 0 0 50% 50%;
  background: rgba(0, 0, 0, 0.18);
}
.bp-balloon:active .bp-balloon-body {
  transform: scale(0.94);
}
.bp-balloon.bp-pop {
  animation: none;
  pointer-events: none;
}
.bp-balloon.bp-pop .bp-balloon-body {
  animation: bp-burst 0.4s ease forwards;
}
.bp-balloon.bp-shake .bp-balloon-body {
  animation: bp-shake 0.4s ease;
}
@keyframes bp-rise {
  0% { top: 108%; transform: translateX(calc(-50% - 10px)); }
  50% { transform: translateX(calc(-50% + 10px)); }
  100% { top: -28%; transform: translateX(calc(-50% - 10px)); }
}
@keyframes bp-burst {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; }
}
@keyframes bp-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-5px) rotate(-6deg); }
  75% { transform: translateX(5px) rotate(6deg); }
}

/* ===== Game 61: Symbol Quiz ===== */
.ss {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ss-clue {
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #4a3a86;
  text-align: center;
  background: #fff7e2;
  border: 2px solid #ffe2a8;
  border-radius: 999px;
  padding: 10px 22px;
}
.ss-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(46vw, 240px);
  height: min(46vw, 240px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}
.ss-emoji {
  font-size: min(28vw, 150px);
  line-height: 1;
}
.ss-img {
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
}
.ss-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
}
.ss-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 200px;
  max-width: 300px;
  padding: 14px 18px;
  border: 2px solid #dfe6f2;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 800;
  color: #2b3a55;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ss-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.ss-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}
.ss-c0 { background: #f2fbf4; border-color: #bfe6c8; }
.ss-c0 .ss-badge { background: #37a35a; }
.ss-c0 .ss-label { color: #2b7a45; }
.ss-c1 { background: #fff7ec; border-color: #ffd9a8; }
.ss-c1 .ss-badge { background: #f2803f; }
.ss-c1 .ss-label { color: #c25a1c; }
.ss-c2 { background: #eef4ff; border-color: #bcd3ff; }
.ss-c2 .ss-badge { background: #2f7bef; }
.ss-c2 .ss-label { color: #1f5bc0; }
.ss-opt.is-right {
  border-color: #37a35a;
  box-shadow: 0 0 0 3px rgba(55, 163, 90, 0.35);
  transform: translateY(-2px) scale(1.02);
}
.ss-opt.is-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
  box-shadow: 0 0 0 3px rgba(226, 87, 76, 0.3);
}

/* ===== Game 62: Synonym / Antonym Match ===== */
.wm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.wm-mode {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  padding: 6px 20px;
}
.wm-mode.wm-synonym { background: linear-gradient(90deg, #7b3ff2, #9b6bff); }
.wm-mode.wm-antonym { background: linear-gradient(90deg, #ef6ea0, #f2803f); }
.wm-word {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(70vw, 420px);
  padding: 18px 30px;
  background: #fff;
  border: 3px solid #c9b6f5;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 800;
  color: #4a3a86;
}
.wm-sub {
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  font-weight: 800;
  color: #fff;
  background: #9b6bff;
  border-radius: 999px;
  padding: 6px 18px;
}
.wm-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
}
.wm-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 200px;
  max-width: 300px;
  padding: 14px 18px;
  border: 2px solid #dfe6f2;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 800;
  color: #2b3a55;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.wm-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.wm-opt.is-right {
  border-color: #37a35a;
  box-shadow: 0 0 0 3px rgba(55, 163, 90, 0.35);
  transform: translateY(-2px) scale(1.02);
}
.wm-opt.is-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
  box-shadow: 0 0 0 3px rgba(226, 87, 76, 0.3);
}

/* ===== Game 63: Plural Power ===== */
.pw {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pw-clue {
  align-self: center;
  font-size: clamp(1rem, 3.2vw, 1.35rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #4f8ff0, #6aa8ff);
  border-radius: 999px;
  padding: 8px 24px;
}
.pw-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pw-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 22px;
  border: 3px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.pw-c0 { background: #fff0f5; border-color: #f7c9db; }
.pw-c1 { background: #eef4ff; border-color: #c3d8ff; }
.pw-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}
.pw-c0 .pw-num { background: #ef6ea0; }
.pw-c1 .pw-num { background: #4f8ff0; }
.pw-emoji {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  line-height: 1;
  flex: 0 0 auto;
}
.pw-word {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 800;
  color: #2b3a55;
  min-width: 2.5em;
}
.pw-arrow {
  font-size: clamp(1.4rem, 4vw, 2rem);
  flex: 0 0 auto;
}
.pw-c0 .pw-arrow { color: #ef6ea0; }
.pw-c1 .pw-arrow { color: #4f8ff0; }
.pw-inputwrap {
  flex: 1 1 auto;
  min-width: 120px;
}
.pw-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 2px dashed #b9c6dd;
  border-radius: 14px;
  background: #fff;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 800;
  color: #2b3a55;
  text-align: center;
  outline: none;
}
.pw-input:focus {
  border-color: #7b3ff2;
  box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.2);
}
.pw-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d6f5df;
  color: #2fae57;
  font-size: 1.5rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pw-row.pw-right {
  border-color: #37a35a;
  background: #eafaef;
}
.pw-row.pw-right .pw-input {
  border-style: solid;
  border-color: #37a35a;
  color: #2b7a45;
  background: #f4fff7;
}
.pw-row.pw-right .pw-check {
  background: #37a35a;
  color: #fff;
  opacity: 1;
  transform: scale(1);
}
.pw-row.pw-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
}
.pw-row.pw-wrong .pw-input {
  border-color: #e2574c;
  color: #c23a2f;
}

/* ===== Game 64: Choose the Correct Article ===== */
.ap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.ap-clue {
  font-size: clamp(1rem, 3.2vw, 1.3rem);
  font-weight: 800;
  color: #a9741e;
  background: #fff5da;
  border: 2px solid #ffe2a0;
  border-radius: 999px;
  padding: 8px 22px;
}
.ap-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(78vw, 380px);
  padding: 20px;
  background: #fff;
  border: 3px dashed #bcd3ff;
  border-radius: 26px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.ap-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(38vw, 220px);
  background: #f6f9ff;
  border-radius: 20px;
}
.ap-emoji {
  font-size: min(26vw, 140px);
  line-height: 1;
}
.ap-img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}
.ap-word {
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  border: 2px dashed #c9d6ec;
  border-radius: 16px;
  background: #fbfdff;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 800;
  color: #2b3a86;
}
.ap-options {
  display: flex;
  gap: 20px;
  width: min(78vw, 380px);
}
.ap-opt {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 1.15 / 1;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.ap-opt:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.ap-a { border: 3px solid #f3aec4; }
.ap-an { border: 3px solid #b6dcb3; }
.ap-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 56px;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
}
.ap-a .ap-badge { background: #ffe1ea; color: #e34f7d; }
.ap-an .ap-badge { background: #e2f5df; color: #4f9a48; }
.ap-opt.is-right {
  border-color: #37a35a;
  box-shadow: 0 0 0 4px rgba(55, 163, 90, 0.35);
  background: #eafaef;
}
.ap-opt.is-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
  box-shadow: 0 0 0 4px rgba(226, 87, 76, 0.3);
}

/* ===== Game 65: Where Is the Message? ===== */
.mp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.mp-heads {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mp-clue {
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #2f6bef, #4f8ff0);
  border-radius: 999px;
  padding: 8px 24px;
  text-align: center;
}
.mp-sub {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  font-weight: 800;
  color: #a9741e;
  background: #fff5da;
  border: 2px solid #ffe2a0;
  border-radius: 999px;
  padding: 5px 18px;
}
.mp-message {
  padding: 14px 32px;
  background: #f2fbf4;
  border: 3px solid #bfe6c8;
  border-radius: 18px;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  color: #2f9e57;
}
.mp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
}
@media (max-width: 640px) {
  .mp-grid { grid-template-columns: repeat(2, 1fr); }
}
.mp-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 2px solid #cfe0ff;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.mp-opt:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}
.mp-emoji {
  font-size: clamp(2.6rem, 9vw, 4rem);
  line-height: 1;
}
.mp-label {
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  font-weight: 800;
  color: #2b3a86;
  text-align: center;
}
.mp-check {
  width: 30px;
  height: 30px;
  border: 2px solid #b9c6dd;
  border-radius: 8px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mp-opt.is-right {
  border-color: #37a35a;
  box-shadow: 0 0 0 3px rgba(55, 163, 90, 0.3);
  background: #eafaef;
}
.mp-opt.is-right .mp-check {
  border-color: #37a35a;
  background: #37a35a
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 68% no-repeat;
}
.mp-opt.is-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
  box-shadow: 0 0 0 3px rgba(226, 87, 76, 0.3);
}

/* ===== Game 66: Complete the Sentence ===== */
.sf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.sf-clue {
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #3358d4, #4f8ff0);
  border-radius: 18px;
  padding: 10px 26px;
  text-align: center;
}
.sf-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(82vw, 460px);
  padding: 22px;
  background: #fff;
  border: 3px dashed #bcd3ff;
  border-radius: 26px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.sf-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(34vw, 190px);
}
.sf-emoji {
  font-size: min(26vw, 130px);
  line-height: 1;
}
.sf-img {
  max-width: 70%;
  max-height: min(34vw, 190px);
  object-fit: contain;
}
.sf-sentence {
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  border: 2px solid #dce6f5;
  border-radius: 16px;
  background: #f8fbff;
  font-size: clamp(1.3rem, 5vw, 2rem);
  font-weight: 800;
  color: #26386b;
  line-height: 1.5;
}
.sf-blank {
  display: inline-block;
  min-width: 2.6em;
  margin: 0 0.15em;
  color: #b9c6dd;
  border-bottom: 3px solid #9db4dd;
  transition: color 0.2s ease;
}
.sf-blank.is-filled {
  color: #2f9e57;
  border-bottom-color: #2f9e57;
}
.sf-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
}
.sf-opt {
  flex: 0 1 130px;
  min-width: 110px;
  padding: 22px 10px;
  border-radius: 20px;
  border: 3px dashed transparent;
  cursor: pointer;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 800;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.sf-opt:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.sf-c0 { background: #fff6e2; border-color: #f4d79a; color: #e08a1e; }
.sf-c1 { background: #eefaef; border-color: #b6dcb3; color: #3f9a45; }
.sf-c2 { background: #f2ecfb; border-color: #cdb6ef; color: #7b3ff2; }
.sf-c3 { background: #e9f2ff; border-color: #b6ccef; color: #2f6bef; }
.sf-opt.is-right {
  border-style: solid;
  border-color: #37a35a;
  box-shadow: 0 0 0 4px rgba(55, 163, 90, 0.3);
  transform: translateY(-2px) scale(1.04);
}
.sf-opt.is-wrong {
  animation: bp-shake 0.4s ease;
  border-style: solid;
  border-color: #e2574c;
  box-shadow: 0 0 0 4px rgba(226, 87, 76, 0.3);
}

/* ===== Game 67: Match the Numbers (line match) ===== */
.nm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.nm-clue {
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #7b3ff2, #9b6bff);
  border-radius: 18px;
  padding: 10px 26px;
  text-align: center;
}
.nm-board {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding: 20px;
  background: #fff;
  border: 3px solid #d9c7f7;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.nm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.nm-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(60px, 20vw, 180px);
  z-index: 1;
}
.nm-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nm-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(#eaf1ff, #d9e6ff);
  border: 2px solid #b9cdf2;
  box-shadow: 0 3px 0 rgba(120, 140, 180, 0.25);
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.nm-left { justify-content: space-between; }
.nm-right { justify-content: space-between; flex-direction: row; }
.nm-val {
  font-size: clamp(1.3rem, 4.5vw, 1.9rem);
  font-weight: 800;
  color: #2b3a86;
}
.nm-dot {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid #ef6ea0;
  background: #fff;
  cursor: pointer;
  padding: 0;
  touch-action: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.nm-dot:hover { transform: scale(1.15); }
.nm-card.is-matched {
  border-color: #37a35a;
  background: linear-gradient(#eafaef, #d7f5e1);
}
.nm-card.is-matched .nm-dot {
  border-color: #37a35a;
  background: #37a35a;
}
.nm-card.nm-shake { animation: bp-shake 0.4s ease; }
.nm-hint {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  font-weight: 700;
  color: #7b3ff2;
  background: #f3ecff;
  border: 2px solid #d9c7f7;
  border-radius: 999px;
  padding: 8px 20px;
  text-align: center;
}

/* ===== Game 68: Raindrop Numbers ===== */
.rd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.rd-clue {
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #2148c0, #2f6bef);
  border-radius: 16px;
  padding: 10px 26px;
  text-align: center;
}
.rd-targets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid #cfe0ff;
  border-radius: 18px;
  padding: 8px 16px;
}
.rd-targets-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: #2f6bef;
  border-radius: 999px;
  padding: 3px 16px;
}
.rd-chips {
  display: flex;
  gap: 10px;
}
.rd-chip {
  min-width: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #eaf1ff;
  border: 2px solid #c3d8ff;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 800;
  color: #2148c0;
  text-align: center;
}
.rd-sky {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: min(58vh, 440px);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(#bfe0ff, #dcefff 70%, #cfeffe);
  border: 3px solid #bcd8ff;
}
.rd-drop {
  position: absolute;
  top: -18%;
  width: clamp(54px, 12vw, 82px);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  animation-name: rd-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--dur, 6s);
  -webkit-tap-highlight-color: transparent;
}
.rd-shape { width: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.12)); }
.rd-shape path { fill: #9fd0f7; stroke: #6fb2e8; stroke-width: 3; }
.rd-shine { fill: #ffffff; opacity: 0.55; }
.rd-num {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  font-weight: 800;
  color: #1f4ea3;
}
.rd-drop.rd-wrong { animation: rd-fall var(--dur,6s) linear infinite, bp-shake 0.4s ease; }
.rd-drop.rd-burst {
  animation: none;
  z-index: 3;
}
.rd-drop.rd-burst .rd-shape { animation: rd-pop 0.4s ease forwards; }
.rd-drop.rd-gone { display: none; }
@keyframes rd-fall {
  0% { top: -18%; transform: translateX(calc(-50% - 8px)); }
  50% { transform: translateX(calc(-50% + 8px)); }
  100% { top: 118%; transform: translateX(calc(-50% - 8px)); }
}
@keyframes rd-pop {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; }
}
.rd-hint {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  font-weight: 700;
  color: #2148c0;
  background: #eaf1ff;
  border: 2px solid #c3d8ff;
  border-radius: 999px;
  padding: 8px 20px;
  text-align: center;
}

/* ===== Game 69: Shape Addition ===== */
.sa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.sa-clue {
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #6a3fd6, #8b5bf2);
  border-radius: 16px;
  padding: 10px 26px;
  text-align: center;
}
.sa-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 620px;
  padding: 10px 14px;
  background: #f4fbf2;
  border: 2px solid #cdeac4;
  border-radius: 18px;
}
.sa-legend-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: #5fb257;
  border-radius: 999px;
  padding: 3px 16px;
}
.sa-legend-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.sa-legend-item {
  width: clamp(42px, 10vw, 58px);
}
.sa-shape-svg {
  width: 100%;
  height: auto;
  display: block;
}
.sa-eq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 20px);
  width: 100%;
  max-width: 620px;
  padding: 22px;
  background: #fff;
  border: 3px solid #cfe0ff;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.sa-shape {
  width: clamp(70px, 18vw, 120px);
}
.sa-op {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  color: #26386b;
}
.sa-answer {
  width: clamp(70px, 18vw, 110px);
  height: clamp(70px, 18vw, 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #9db4dd;
  border-radius: 16px;
  background: #f6f9ff;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sa-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  color: #26386b;
  outline: none;
}
.sa-answer.sa-right {
  border-color: #37a35a;
  background: #eafaef;
}
.sa-answer.sa-right .sa-input { color: #2f9e57; }
.sa-answer.sa-wrong {
  animation: bp-shake 0.4s ease;
  border-color: #e2574c;
  background: #fdeceb;
}
.sa-progress {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  font-weight: 800;
  color: #6a3fd6;
}

/* Game 71 - Missing Letters (emotions) */
.ml {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}
.ml-clue {
  text-align: center;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 800;
  color: #b0429a;
  background: #fff0fb;
  border: 2px solid #f4c4e8;
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: 0 4px 12px rgba(176, 66, 154, 0.14);
}
.ml-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.ml-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 20px;
  border: 3px solid transparent;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ml-c0 { background: linear-gradient(135deg, #fff3c4, #ffe08a); }
.ml-c1 { background: linear-gradient(135deg, #cdeafe, #a9d7fb); }
.ml-c2 { background: linear-gradient(135deg, #d6f7dd, #aeeec1); }
.ml-c3 { background: linear-gradient(135deg, #ffd9e6, #ffbcd4); }
.ml-row.is-done {
  border-color: #34c759;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(52, 199, 89, 0.28);
}
.ml-emoji {
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  line-height: 1;
  flex-shrink: 0;
}
.ml-word {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.ml-tile {
  width: clamp(34px, 9.5vw, 46px);
  height: clamp(42px, 11vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 900;
  color: #4a3b7a;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}
.ml-tile.is-fixed {
  background: rgba(255, 255, 255, 0.9);
}
.ml-input {
  width: 100%;
  height: 100%;
  border: 3px dashed #b28be0;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 900;
  color: #6a3fd6;
  text-transform: uppercase;
  padding: 0;
  outline: none;
}
.ml-input:focus {
  border-color: #8a5cf0;
  box-shadow: 0 0 0 4px rgba(138, 92, 240, 0.2);
}
.ml-tile.is-right .ml-input {
  border-style: solid;
  border-color: #34c759;
  color: #1f9d4d;
  background: #eafff0;
}
.ml-tile.is-wrong .ml-input {
  border-color: #ff4d4f;
  color: #ff4d4f;
  animation: ml-shake 0.4s ease;
}
.ml-check {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  color: #34c759;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.ml-row.is-done .ml-check {
  opacity: 1;
  transform: scale(1);
}
@keyframes ml-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Game 70 - Label the Object (drag) */
.ld {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.ld-scene {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 8px;
  width: min(460px, 94vw);
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(160deg, #f3fff2, #eaf6ff);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06);
}
.ld-object {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(3rem, 17vw, 5.5rem);
  line-height: 1;
}
.ld-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.ld-marker { font-size: clamp(1.7rem, 8vw, 2.4rem); line-height: 1; }
.ld-box {
  min-width: clamp(78px, 24vw, 108px);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px dashed #b28be0;
  border-radius: 12px;
  background: #fff;
  font-weight: 900;
  font-size: clamp(0.8rem, 3.4vw, 1rem);
  color: #6a3fd6;
  padding: 4px 6px;
}
.ld-box.filled {
  border-style: solid;
  border-color: #34c759;
  color: #1f9d4d;
  background: #eafff0;
}
.ld-box.ld-shake { animation: ml-shake 0.4s ease; border-color: #ff4d4f; }
.ld-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.ld-chip {
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: clamp(0.9rem, 3.4vw, 1.1rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #8a5cf0, #6a3fd6);
  box-shadow: 0 5px 14px rgba(106, 63, 214, 0.35);
  cursor: grab;
  touch-action: none;
}
.ld-chip:nth-child(5n + 1) { background: linear-gradient(135deg, #ff8fb1, #ec5a8d); }
.ld-chip:nth-child(5n + 2) { background: linear-gradient(135deg, #ffca5f, #f5a623); }
.ld-chip:nth-child(5n + 3) { background: linear-gradient(135deg, #7ad67a, #3aa64a); }
.ld-chip:nth-child(5n + 4) { background: linear-gradient(135deg, #6fc6f5, #2f8fd6); }
.ld-chip.sel { outline: 4px solid rgba(106, 63, 214, 0.4); transform: scale(1.05); }
.ld-chip.used { opacity: 0.32; cursor: default; box-shadow: none; }
.ld-chip:active { cursor: grabbing; }
.ld-ghost {
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.92;
}

/* Game 71 - Decode the Name */
.dc-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 2vw, 16px);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.dc-table {
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.dc-head {
  background: linear-gradient(135deg, #8a5cf0, #6a3fd6);
  color: #fff;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  padding: 6px 10px;
  font-size: clamp(0.7rem, 2.4vw, 0.9rem);
}
.dc-row { display: flex; }
.dc-letter,
.dc-code {
  width: clamp(26px, 6vw, 40px);
  height: clamp(24px, 5.6vw, 34px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(0.7rem, 2.6vw, 0.95rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dc-letter { background: #ffdede; color: #b13b5a; }
.dc-code { background: #fff6d6; color: #7a5a12; }
.dc-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dc-object {
  width: 100%;
  min-height: clamp(140px, 40vw, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem, 26vw, 9rem);
  line-height: 1;
  border: 3px solid #ead9ff;
  border-radius: 20px;
  background: #fff;
}
.dc-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 1.6vw, 10px);
}
.dc-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.dc-num {
  font-weight: 900;
  color: #4b2f9c;
  font-size: clamp(0.95rem, 3.6vw, 1.3rem);
}
.dc-box {
  width: clamp(34px, 9vw, 52px);
  height: clamp(38px, 10vw, 56px);
  border: 3px solid #b28be0;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 1.7rem);
  color: #4b2f9c;
  text-transform: uppercase;
  caret-color: #6a3fd6;
}
.dc-box:focus { outline: none; border-color: #6a3fd6; box-shadow: 0 0 0 4px rgba(106, 63, 214, 0.18); }
.dc-box.ok { border-color: #34c759; color: #1f9d4d; background: #eafff0; }
.dc-box.bad { border-color: #ff4d4f; color: #d63031; animation: ml-shake 0.4s ease; }

@media (max-width: 520px) {
  .dc-letter,
  .dc-code { width: 26px; height: 22px; font-size: 0.68rem; }
}

/* Game 76 - Feed the Monster (cute 3D) */
.fm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 0 6px;
  border-radius: 26px;
  background: radial-gradient(120% 90% at 50% 0%, #eaf6ff 0%, #f7f0ff 60%, #ffeef6 100%);
}
.fm-progress {
  font-weight: 900;
  color: #6a3fd6;
  font-size: clamp(0.9rem, 3.4vw, 1.1rem);
}
.fm-question {
  text-align: center;
  min-height: 54px;
}
.fm-prompt {
  font-weight: 900;
  color: #3a2a6b;
  font-size: clamp(1.1rem, 5vw, 1.7rem);
  line-height: 1.2;
}
.fm-emojis {
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 4px;
  margin-top: 4px;
}
.fm-stage {
  position: relative;
  width: min(300px, 74vw);
  height: min(300px, 74vw);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fm-monster {
  position: relative;
  width: 74%;
  height: 74%;
  animation: fm-bob 2.4s ease-in-out infinite;
  transform-origin: bottom center;
}
.fm-body {
  position: absolute;
  inset: 0;
  border-radius: 46% 46% 42% 42%;
  background:
    radial-gradient(60% 45% at 34% 26%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(120% 120% at 65% 78%, #1f9d7a 0%, #2fc79a 42%, #6be3bd 100%);
  box-shadow:
    inset -14px -18px 30px rgba(0, 80, 60, 0.35),
    inset 12px 14px 26px rgba(255, 255, 255, 0.5),
    0 22px 34px rgba(31, 120, 95, 0.35);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fm-eye {
  position: absolute;
  top: 26%;
  width: 26%;
  height: 30%;
  background: radial-gradient(60% 60% at 40% 35%, #fff 0%, #eef4ff 70%, #d7e2f5 100%);
  border-radius: 50%;
  box-shadow: inset -3px -4px 8px rgba(70, 90, 130, 0.25), 0 3px 6px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.fm-eye-l { left: 16%; }
.fm-eye-r { right: 16%; }
.fm-pupil {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 46%;
  height: 46%;
  background: radial-gradient(50% 50% at 38% 32%, #4a4a68 0%, #16162b 75%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: fm-blink 3.6s infinite;
}
.fm-pupil::after {
  content: "";
  position: absolute;
  left: 22%;
  top: 16%;
  width: 32%;
  height: 32%;
  background: #fff;
  border-radius: 50%;
}
.fm-cheek {
  position: absolute;
  top: 54%;
  width: 16%;
  height: 12%;
  background: rgba(255, 120, 150, 0.55);
  border-radius: 50%;
  filter: blur(1px);
}
.fm-cheek-l { left: 10%; }
.fm-cheek-r { right: 10%; }
.fm-mouth {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 40%;
  height: 16%;
  background: linear-gradient(#8e1f3a, #5c0f24);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  transform: translateX(-50%);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: height 0.18s ease, width 0.18s ease;
}
.fm-tongue {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 60%;
  height: 70%;
  background: radial-gradient(60% 60% at 50% 30%, #ff8fae, #f0567f);
  border-radius: 50%;
  transform: translateX(-50%);
}
.fm-foot {
  position: absolute;
  bottom: -4%;
  width: 26%;
  height: 12%;
  background: radial-gradient(60% 60% at 40% 30%, #2fc79a, #178a68);
  border-radius: 50%;
  box-shadow: 0 6px 10px rgba(31, 120, 95, 0.35);
}
.fm-foot-l { left: 16%; }
.fm-foot-r { right: 16%; }
.fm-monster.fm-chomp .fm-mouth { height: 26%; width: 46%; }
.fm-monster.fm-chomp .fm-body { animation: fm-happy 0.45s ease; }
.fm-monster.fm-sad .fm-body { animation: fm-shake 0.5s ease; }
.fm-monster.fm-sad .fm-mouth { border-radius: 60% 60% 0 0 / 100% 100% 0 0; top: 66%; height: 10%; }

.fm-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 3vw, 18px);
  min-height: 72px;
}
.fm-bubble {
  width: clamp(58px, 16vw, 76px);
  height: clamp(58px, 16vw, 76px);
  border: none;
  border-radius: 50%;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(60% 55% at 34% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(120% 120% at 60% 80%, #ff7eb3 0%, #ff5c8a 55%, #ff3d76 100%);
  box-shadow: inset -6px -8px 14px rgba(150, 20, 60, 0.35), 0 10px 18px rgba(255, 60, 120, 0.35);
  animation: fm-float 2.6s ease-in-out infinite;
}
.fm-bubble:nth-child(3n + 1) {
  background:
    radial-gradient(60% 55% at 34% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(120% 120% at 60% 80%, #66c8ff 0%, #349bf0 55%, #1f7fe0 100%);
  box-shadow: inset -6px -8px 14px rgba(20, 70, 150, 0.35), 0 10px 18px rgba(40, 130, 240, 0.35);
}
.fm-bubble:nth-child(3n + 2) {
  background:
    radial-gradient(60% 55% at 34% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(120% 120% at 60% 80%, #ffd76b 0%, #ffb02e 55%, #f59300 100%);
  box-shadow: inset -6px -8px 14px rgba(150, 100, 10, 0.3), 0 10px 18px rgba(245, 160, 0, 0.35);
}
.fm-bubble:active { transform: scale(0.94); }
.fm-bubble.fm-flying {
  transition: transform 0.48s cubic-bezier(0.5, -0.2, 0.7, 0.5), opacity 0.48s ease;
  animation: none;
  z-index: 5;
}
.fm-bubble.fm-fade { opacity: 0.15; pointer-events: none; }
.fm-bubble.fm-wrong { animation: fm-shake 0.5s ease; }

@keyframes fm-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes fm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fm-blink {
  0%, 92%, 100% { transform: translate(-50%, -50%) scaleY(1); }
  96% { transform: translate(-50%, -50%) scaleY(0.1); }
}
@keyframes fm-happy {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.08, 0.94); }
  70% { transform: scale(0.97, 1.05); }
}
@keyframes fm-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-3deg); }
  75% { transform: translateX(8px) rotate(3deg); }
}

/* ===== Game 76: Triangle Addition (Cool Math style) ===== */
.ta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}
.ta-clue {
  font-weight: 800;
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg, #e85d04, #f48c06);
  border-radius: 16px;
  padding: 10px 20px;
  box-shadow: 0 8px 0 rgba(180, 70, 0, 0.25);
}
.ta-board {
  width: min(420px, 94vw);
  padding: 12px;
  background: linear-gradient(165deg, #fffdf5, #fff0d6);
  border: 3px solid #f4a261;
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(232, 93, 4, 0.15);
}
.ta-svg {
  width: 100%;
  height: auto;
  display: block;
}
.ta-fill {
  fill: #fffaf0;
}
.ta-outline {
  fill: none;
  stroke: #e85d04;
  stroke-width: 5;
  stroke-linejoin: round;
}
.ta-line {
  stroke: #e85d04;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ta-glow {
  fill: #ffe566;
  stroke: #ffc43a;
  stroke-width: 3;
  filter: url(#taGlow);
  animation: ta-pulse 1.6s ease-in-out infinite;
}
.ta-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  fill: #264653;
  pointer-events: none;
}
.ta-num-hot {
  fill: #9d0208;
  font-size: 24px;
}
.ta-equation {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  color: #264653;
  background: #fff;
  border: 2px dashed #f4a261;
  border-radius: 14px;
  padding: 8px 22px;
}
.ta-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.ta-opt {
  min-width: 72px;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(145deg, #4895ef, #4361ee);
  box-shadow: 0 8px 0 #2b3a8c, 0 12px 20px rgba(67, 97, 238, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ta-opt:hover { transform: translateY(-2px); }
.ta-opt:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #2b3a8c;
}
.ta-opt-right {
  background: linear-gradient(145deg, #2fbf71, #1b9e55);
  box-shadow: 0 8px 0 #157a42;
  animation: ta-pop 0.45s ease;
}
.ta-opt-wrong {
  animation: fm-shake 0.45s ease;
  background: linear-gradient(145deg, #ff6b6b, #e03131);
  box-shadow: 0 8px 0 #9b1c1c;
}
.ta-progress {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.9rem;
}
.ta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}
.ta-tier {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(232,93,4,0.35);
  border-radius: 999px;
  padding: 5px 12px;
  color: #9d0208;
}
.ta-hint-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  background: #fff;
  color: #4361ee;
  box-shadow: 0 4px 0 #2b3a8c;
  transition: transform 0.12s ease;
}
.ta-hint-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ta-hint-btn:disabled { opacity: 0.65; cursor: default; box-shadow: none; }
.ta-pattern {
  font-weight: 700;
  font-size: 0.95rem;
  color: #264653;
  text-align: center;
}
.ta-equation-hint .ta-hint-num {
  color: #e85d04;
  font-weight: 900;
}
.ta-glow-pulse { animation: ta-pulse 0.55s ease-in-out 3; }
.ta-shake { animation: fm-shake 0.45s ease; }
.ta-theme-wrap-sky .ta-clue { background: linear-gradient(90deg, #4895ef, #4361ee); box-shadow: 0 8px 0 rgba(43,58,140,0.25); }
.ta-theme-wrap-violet .ta-clue { background: linear-gradient(90deg, #7b2cbf, #9d4edd); box-shadow: 0 8px 0 rgba(90,24,154,0.25); }
.ta-theme-wrap-rose .ta-clue { background: linear-gradient(90deg, #f72585, #b5179e); box-shadow: 0 8px 0 rgba(123,15,105,0.25); }
.ta-theme-wrap-gold .ta-clue { background: linear-gradient(90deg, #ffba08, #faa307); box-shadow: 0 8px 0 rgba(180,120,0,0.3); color: #5c3d00; }
.ta-theme-sky .ta-outline, .ta-theme-sky .ta-line { stroke: #4361ee; }
.ta-theme-violet .ta-outline, .ta-theme-violet .ta-line { stroke: #7b2cbf; }
.ta-theme-rose .ta-outline, .ta-theme-rose .ta-line { stroke: #f72585; }
.ta-theme-gold .ta-outline, .ta-theme-gold .ta-line { stroke: #faa307; }
@keyframes ta-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}
@keyframes ta-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Game 72 - Write the First Letter */
.fl {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.fl-row {
  display: flex;
  justify-content: space-around;
  gap: clamp(8px, 3vw, 20px);
  background: #fff;
  border: 3px solid #eee3ff;
  border-radius: 20px;
  padding: 16px clamp(10px, 3vw, 22px);
  box-shadow: 0 6px 16px rgba(120, 80, 200, 0.1);
}
.fl-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.fl-pic {
  font-size: clamp(2.6rem, 12vw, 4rem);
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}
.fl-box {
  width: clamp(46px, 13vw, 62px);
  height: clamp(46px, 13vw, 62px);
  border: 3px dashed #b28be0;
  border-radius: 14px;
  background: #fbf8ff;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.4rem, 6vw, 2rem);
  color: #5a2fb0;
  text-transform: uppercase;
  caret-color: #6a3fd6;
}
.fl-box:focus { outline: none; border-style: solid; border-color: #6a3fd6; box-shadow: 0 0 0 4px rgba(106, 63, 214, 0.18); }
.fl-box.ok { border-style: solid; border-color: #34c759; color: #1f9d4d; background: #eafff0; }
.fl-box.bad { border-style: solid; border-color: #ff4d4f; color: #d63031; animation: ml-shake 0.4s ease; }

/* Game 81 - Connect the Dots */
.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.cd-hint {
  font-weight: 800;
  color: #5a2fb0;
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
  text-align: center;
}
.cd-hint b { color: #e0489a; }
.cd-stage {
  width: 100%;
  display: flex;
  justify-content: center;
}
.cd-canvas {
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(60, 30, 120, 0.4);
  touch-action: none;
  cursor: pointer;
}

/* Game 73 - Single Line Puzzle */
.ol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.ol-hint {
  font-weight: 800;
  color: #5a2fb0;
  font-size: clamp(0.9rem, 3.4vw, 1.1rem);
  text-align: center;
  max-width: 520px;
}
.ol-status {
  font-weight: 800;
  font-size: clamp(0.82rem, 3vw, 0.98rem);
  color: #4b6280;
  text-align: center;
  min-height: 1.35em;
  max-width: 520px;
}
.ol-status.is-ok { color: #157a42; }
.ol-status.is-warn { color: #b7791f; }
.ol-status.is-bad { color: #b42318; }
.ol-progress {
  font-weight: 900;
  color: #6a3fd6;
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(106, 63, 214, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
}
.ol-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.ol-hint-btn,
.ol-undo,
.ol-reset {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: clamp(0.88rem, 3.1vw, 1.02rem);
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(30, 58, 76, 0.12);
}
.ol-hint-btn { background: #ffe8a3; color: #7a4d00; }
.ol-hint-btn.is-active {
  background: #ff5c7a;
  color: #fff;
  animation: olPulse 1s ease infinite;
}
.ol-undo { background: #e8fff4; color: #0f766e; }
.ol-reset { background: #e8f4ff; color: #1e4b75; }
.ol-hint-btn:active,
.ol-undo:active,
.ol-reset:active { transform: scale(0.96); }
.ol-stage {
  width: 100%;
  display: flex;
  justify-content: center;
}
.ol-canvas {
  width: 100%;
  max-width: 480px;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(30, 15, 70, 0.5);
  touch-action: none;
  cursor: crosshair;
}
@keyframes olPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Game 74 - Arrow Puzzle (tap away arrows) */
.ae {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.ae-top {
  font-weight: 800;
  color: #5a2fb0;
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
}
.ae-top b { color: #e0489a; }
.ae-board {
  display: grid;
  gap: clamp(3px, 1.2vw, 6px);
  width: min(460px, 94vw);
  padding: clamp(8px, 2.4vw, 14px);
  background: radial-gradient(120% 120% at 50% 0%, #eef3ff 0%, #efe6ff 55%, #f7edff 100%);
  border: 3px solid #e2d5fb;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(120, 80, 200, 0.18), inset 0 2px 8px rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.ae-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-dot {
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e7dcff, #cdbaf0);
  opacity: 0.7;
}
.ae-arrow {
  position: relative;
  width: 94%;
  height: 94%;
  border: none;
  border-radius: 30%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 5px 0 rgba(60, 30, 110, 0.22),
    0 7px 12px rgba(80, 40, 140, 0.28),
    inset 0 3px 6px rgba(255, 255, 255, 0.55),
    inset 0 -5px 8px rgba(0, 0, 0, 0.14);
  z-index: 1;
  overflow: hidden;
  animation: ae-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ae-arrow::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 12%;
  width: 76%;
  height: 40%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.ae-arrow:hover { filter: brightness(1.06); }
.ae-arrow:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(60, 30, 110, 0.22), inset 0 3px 6px rgba(255, 255, 255, 0.5); }
.ae-glyph {
  position: relative;
  color: #fff;
  font-size: clamp(1.1rem, 5.6vw, 1.9rem);
  line-height: 1;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 2;
}
.ae-arrow.ae-blocked { animation: ml-shake 0.4s ease; filter: brightness(0.9) saturate(0.8); }
.ae-arrow.ae-blocked::after {
  content: "🔒";
  position: absolute;
  font-size: clamp(0.7rem, 2.6vw, 0.95rem);
  right: 3px;
  top: 3px;
  text-shadow: none;
  z-index: 3;
}
@keyframes ae-in {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.ae-reset {
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #8a5cf0, #6a3fd6);
  box-shadow: 0 6px 16px rgba(106, 63, 214, 0.35);
  cursor: pointer;
}
.ae-reset:active { transform: scale(0.96); }

/* Game 75 - Tile Match (triple tile) */
.tm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.tm-top {
  font-weight: 800;
  color: #5a2fb0;
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
}
.tm-top b { color: #e0489a; }
.tm-warn {
  display: none;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #e0333f);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(224, 51, 63, 0.35);
  font-size: clamp(0.85rem, 3.2vw, 1rem);
}
.tm-warn.tm-show { display: block; animation: tm-pop 0.25s ease; }
.tm-board {
  position: relative;
  width: min(440px, 92vw);
  background: linear-gradient(160deg, #dff3ff, #e9e2ff);
  border: 3px solid #d8ccf7;
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(90, 47, 176, 0.12);
}
.tm-tile {
  position: absolute;
  border: none;
  border-radius: 20%;
  background: linear-gradient(160deg, #ffffff, #f2ecff);
  box-shadow: 0 3px 0 rgba(120, 90, 180, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease;
  padding: 0;
}
.tm-tile:active { transform: scale(0.92); }
.tm-tile.tm-leaving {
  animation: tm-leave 0.16s ease forwards;
  z-index: 99 !important;
}
@keyframes tm-leave {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.3) translateY(40px); opacity: 0; }
}
.tm-tile.tm-blocked {
  filter: brightness(0.7) grayscale(0.3);
  cursor: default;
  box-shadow: 0 2px 0 rgba(80, 60, 120, 0.3);
}
.tm-tray {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  width: min(440px, 92vw);
  padding: 8px;
  background: #6a3fd6;
  border-radius: 16px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.25);
}
.tm-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 5vw, 1.7rem);
}
.tm-slot.tm-filled {
  background: linear-gradient(160deg, #ffffff, #f0e9ff);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.9);
  animation: tm-pop 0.2s ease;
}
.tm-tray.tm-shake { animation: ml-shake 0.4s ease; }
@keyframes tm-pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.tm-controls { display: flex; gap: 12px; }
.tm-undo,
.tm-reset {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.tm-undo { background: linear-gradient(135deg, #ffb347, #f59300); box-shadow: 0 6px 14px rgba(245, 147, 0, 0.35); }
.tm-reset { background: linear-gradient(135deg, #8a5cf0, #6a3fd6); box-shadow: 0 6px 14px rgba(106, 63, 214, 0.35); }
.tm-undo:active,
.tm-reset:active { transform: scale(0.96); }

/* ===================== FUN ZONE (games 75-100) ===================== */
.fun {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}
.fun-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.fun-goal, .fun-score {
  font-weight: 900;
  font-size: clamp(0.95rem, 3.2vw, 1.2rem);
  padding: 8px 16px;
  border-radius: 999px;
}
.fun-goal { background: #ede7ff; color: #6a3fd6; }
.fun-score { background: #fff0f7; color: #d1478f; }
.fun-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(160deg, #f7f4ff, #eef6ff);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06);
}
.fun-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  touch-action: none;
  cursor: pointer;
}
.fun-tip {
  text-align: center;
  font-size: clamp(0.82rem, 2.6vw, 0.98rem);
  color: #6b6b8a;
  max-width: 460px;
  line-height: 1.4;
}
.fun-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 20, 60, 0.55);
  border-radius: 22px;
  z-index: 5;
  animation: fun-fade 0.2s ease;
}
@keyframes fun-fade { from { opacity: 0; } to { opacity: 1; } }
.fun-over-box {
  background: #fff;
  border-radius: 18px;
  padding: 22px 26px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.fun-over-box p {
  margin: 0 0 14px;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 800;
  color: #4a3b7a;
}
.fun-over-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #8a5cf0, #6a3fd6);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(106, 63, 214, 0.4);
}
.fun-over-btn:active { transform: scale(0.96); }
.fun-over-win { background: rgba(25, 12, 55, 0.62); backdrop-filter: blur(2px); }
.fun-win-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: min(78vw, 280px);
  padding: 26px 28px 24px;
  animation: fun-win-pop 0.45s cubic-bezier(0.2, 1.2, 0.3, 1);
}
@keyframes fun-win-pop {
  from { transform: scale(0.72); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.fun-win-title { margin: 8px 0 0 !important; color: #5a2fb0 !important; }
.fun-win-sub {
  margin: 0 0 8px !important;
  font-size: clamp(0.9rem, 3vw, 1.05rem) !important;
  font-weight: 700 !important;
  color: #7a6aa0 !important;
}
.fun-done-btn {
  min-width: 140px;
  background: linear-gradient(135deg, #37b24d, #2b8a3e) !important;
  box-shadow: 0 8px 18px rgba(43, 138, 62, 0.35) !important;
}
.fun-win-shape {
  width: 88px;
  height: 88px;
  margin-bottom: 4px;
  filter: drop-shadow(0 8px 16px rgba(255, 180, 50, 0.45));
  animation: fun-spark 1.2s ease-in-out infinite;
}
@keyframes fun-spark {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(8deg); }
}
.fun-win-shape--star {
  background: #ffd43b;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.fun-win-shape--spark {
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  clip-path: polygon(50% 0%, 58% 32%, 100% 50%, 58% 68%, 50% 100%, 42% 68%, 0% 50%, 42% 32%);
}
.fun-win-shape--diamond {
  background: linear-gradient(160deg, #74c0fc, #845ef7);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.fun-win-shape--burst {
  background: linear-gradient(135deg, #ff6b6b, #fcc419);
  clip-path: polygon(50% 0%, 63% 18%, 88% 12%, 78% 35%, 100% 50%, 78% 65%, 88% 88%, 63% 82%, 50% 100%, 37% 82%, 12% 88%, 22% 65%, 0% 50%, 22% 35%, 12% 12%, 37% 18%);
}

/* on-screen d-pad (snake) */
.fun-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.fun-pad-row { display: flex; gap: 6px; }
.fun-pad button {
  width: 54px;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #7c5cf0, #5a86f5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.fun-pad button:active { transform: scale(0.94); }

/* 2048 */
.m2048-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(340px, 86vw);
  aspect-ratio: 1;
  padding: 8px;
  background: #cdc6f0;
  border-radius: 14px;
  touch-action: none;
}
.m2048-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 1.8rem);
  background: #e9e4ff;
  color: #6a5bbd;
  transition: transform 0.1s ease;
}
.m2048-tile.v0 { background: #ded8f5; }
.m2048-tile.v2 { background: #fff3d6; color: #a9791f; }
.m2048-tile.v4 { background: #ffe4bd; color: #a9791f; }
.m2048-tile.v8 { background: #ffc09a; color: #fff; }
.m2048-tile.v16 { background: #ff9d6e; color: #fff; }
.m2048-tile.v32 { background: #ff7a59; color: #fff; }
.m2048-tile.v64 { background: #ff5a4d; color: #fff; }
.m2048-tile.v128 { background: #ffd447; color: #fff; font-size: clamp(0.95rem, 4.4vw, 1.5rem); }
.m2048-tile.v256 { background: #ffcb2b; color: #fff; font-size: clamp(0.95rem, 4.4vw, 1.5rem); }
.m2048-tile.v512 { background: #ffbf00; color: #fff; font-size: clamp(0.95rem, 4.4vw, 1.5rem); }
.m2048-tile.v1024 { background: #f7b500; color: #fff; font-size: clamp(0.85rem, 3.8vw, 1.3rem); }
.m2048-tile.v2048 { background: #edc22e; color: #fff; font-size: clamp(0.85rem, 3.8vw, 1.3rem); }

/* whack-a-mole */
.whack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(340px, 86vw);
}
.whack-hole {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #8b5a2b 0%, #5a3a1a 70%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.35);
}
.whack-mole {
  position: absolute;
  left: 12%;
  bottom: -70%;
  width: 76%;
  height: 76%;
  border-radius: 50% 50% 45% 45%;
  transition: bottom 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.whack-hole.up .whack-mole { bottom: 8%; }
.whack-hole.mole .whack-mole::after { content: "🐹"; }
.whack-hole.bomb .whack-mole::after { content: "💣"; }
.whack-hole.hit .whack-mole::after { content: "⭐"; }
.whack-hole.boom { animation: whack-boom 0.4s ease; }
@keyframes whack-boom {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Simon */
.simon-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: min(320px, 82vw);
  aspect-ratio: 1;
}
.simon-pad {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}
.simon-pad.on { opacity: 1; transform: scale(1.04); box-shadow: 0 0 26px currentColor; }
.simon-pad:active { transform: scale(0.97); }
.simon-g { background: #34c759; color: #34c759; }
.simon-r { background: #ff4d6d; color: #ff4d6d; }
.simon-y { background: #ffd23f; color: #ffd23f; }
.simon-b { background: #4cc9f0; color: #4cc9f0; }

/* Reaction */
.react-pad {
  width: min(360px, 88vw);
  min-height: 220px;
  border: none;
  border-radius: 20px;
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  transition: background 0.05s ease;
}
.react-pad.wait { background: linear-gradient(135deg, #ff6b6b, #d64550); }
.react-pad.go { background: linear-gradient(135deg, #34c759, #1f9d4d); }
.react-pad.early, .react-pad.slow { background: linear-gradient(135deg, #ffa63f, #e8811a); font-size: clamp(1rem, 4.4vw, 1.4rem); }

/* Tic Tac Toe */
.fun-ttt .fun-hud {
  align-items: flex-start;
}
.fun-ttt .fun-goal.ttt-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.ttt-mode {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 900;
  font-size: clamp(0.82rem, 2.8vw, 1rem);
  cursor: pointer;
  background: #ede7ff;
  color: #6a3fd6;
  box-shadow: inset 0 0 0 2px transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.ttt-mode.is-on {
  background: #6a3fd6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(106, 63, 214, 0.35);
}
.ttt-mode:not(.is-on):hover {
  box-shadow: inset 0 0 0 2px rgba(106, 63, 214, 0.35);
}
.fun-ttt .fun-score .ttt-mark {
  font-size: 1em;
  margin-right: 2px;
  vertical-align: -0.05em;
}
.ttt-wrap {
  position: relative;
  display: block;
  width: min(320px, 82vw);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
}
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 15%, rgba(90, 200, 255, 0.28), transparent 42%),
    radial-gradient(circle at 80% 85%, rgba(160, 90, 255, 0.25), transparent 45%),
    linear-gradient(160deg, #1a1640, #2a1f66 55%, #15122f);
  padding: 10px;
  border-radius: 18px;
  border: 2px solid rgba(90, 220, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 22px rgba(56, 225, 255, 0.35),
    0 12px 28px rgba(20, 16, 50, 0.35);
  box-sizing: border-box;
}
.ttt-cell {
  border: 1.5px solid rgba(90, 220, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.ttt-cell:hover:not(:disabled) {
  background: rgba(90, 220, 255, 0.14);
}
.ttt-cell:disabled { cursor: default; }
.ttt-cell.is-win {
  background: rgba(90, 220, 255, 0.18);
  box-shadow: 0 0 16px rgba(56, 225, 255, 0.45);
}
.ttt-mark {
  display: block;
  line-height: 1;
  font-size: clamp(1.8rem, 11vw, 3.1rem);
  font-weight: 900;
  pointer-events: none;
  user-select: none;
}
.ttt-x {
  color: #ff4d6d;
  text-shadow:
    0 0 8px rgba(255, 77, 109, 0.95),
    0 0 18px rgba(255, 77, 109, 0.65);
}
.ttt-o {
  color: #38e1ff;
  text-shadow:
    0 0 8px rgba(56, 225, 255, 0.95),
    0 0 18px rgba(56, 225, 255, 0.65);
}
.ttt-win-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}
.ttt-win-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ttt-win-glow,
.ttt-win-core {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s ease-out;
}
.ttt-win-glow {
  stroke: #5ad8ff;
  stroke-width: 14;
  opacity: 0.55;
}
.ttt-win-core {
  stroke: #ffffff;
  stroke-width: 5;
  filter: drop-shadow(0 0 4px #9ef3ff) drop-shadow(0 0 12px #38e1ff);
}
.ttt-win-glow.is-drawn,
.ttt-win-core.is-drawn {
  stroke-dashoffset: 0 !important;
}
.ttt-particle {
  position: absolute;
  border-radius: 50%;
  background: #9ef3ff;
  box-shadow: 0 0 8px #38e1ff, 0 0 14px rgba(90, 220, 255, 0.9);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  animation: ttt-sparkle 0.95s ease-out forwards;
}
@keyframes ttt-sparkle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 10px)) scale(0.35); }
}

/* Match-3 */
.match3-board {
  display: grid;
  grid-template-columns: repeat(var(--s, 8), 1fr);
  gap: 4px;
  width: min(400px, 92vw);
  aspect-ratio: 1;
  padding: 6px;
  background: #ded8f5;
  border-radius: 14px;
  touch-action: manipulation;
}
.match3-gem {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.5);
}
.match3-gem.sel { transform: scale(0.86); box-shadow: 0 0 0 3px #6a3fd6; }
.match3-gem.gx { background: transparent; box-shadow: none; }
.match3-gem.g0 { background: radial-gradient(circle at 35% 30%, #ff9a9e, #ff4d6d); }
.match3-gem.g1 { background: radial-gradient(circle at 35% 30%, #ffe38a, #ffc531); }
.match3-gem.g2 { background: radial-gradient(circle at 35% 30%, #a8f0b6, #34c759); }
.match3-gem.g3 { background: radial-gradient(circle at 35% 30%, #a9e3fb, #4cc9f0); }
.match3-gem.g4 { background: radial-gradient(circle at 35% 30%, #d6c2ff, #b892ff); }
.match3-gem.g5 { background: radial-gradient(circle at 35% 30%, #ffd0a3, #ff9f43); }

/* left/right pad (Sky Bounce) */
.fun-pad-lr { display: flex; gap: 40px; }
.fun-pad-lr button {
  width: 72px;
  height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #7c5cf0, #5a86f5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  touch-action: none;
}
.fun-pad-lr button:active { transform: scale(0.94); }

/* Slide Puzzle */
.slide-board {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: 6px;
  width: min(340px, 84vw);
  aspect-ratio: 1;
  padding: 6px;
  background: #cdc6f0;
  border-radius: 14px;
}
.slide-tile {
  border: none;
  border-radius: 10px;
  font-size: clamp(1.2rem, 6vw, 2rem);
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #7c5cf0, #5a86f5);
  cursor: pointer;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2);
}
.slide-tile.blank { background: transparent; box-shadow: none; cursor: default; }

/* Spot the Difference — Find the Difference (real photo pairs) */
.fd {
  width: min(520px, 96vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
}
.fd-banner {
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.15rem, 4.2vw, 1.55rem);
  letter-spacing: 0.02em;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f9cf4, #1c7ed6);
  box-shadow: 0 6px 0 #155a9c, 0 10px 20px rgba(28, 126, 214, 0.28);
}
.fd-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.fd-lives {
  display: flex;
  gap: 2px;
  font-size: 1.15rem;
}
.fd-heart.is-gone { opacity: 0.35; filter: grayscale(1); }
.fd-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-weight: 800;
  color: #4a4e6a;
  font-size: 0.92rem;
}
.fd-count { color: #1c7ed6; }
.fd-hint-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  background: #fff3bf;
  color: #9c6b00;
  box-shadow: 0 3px 0 #e0b040;
}
.fd-hint-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}
.fd-hint-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #e0b040; }
.fd-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.fd-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #6b6f88;
  background: #e9ecf5;
  box-shadow: inset 0 0 0 2px rgba(80, 90, 130, 0.12);
}
.fd-dot.is-found {
  color: #fff;
  background: linear-gradient(135deg, #4dabf7, #1c7ed6);
  box-shadow: 0 0 0 2px rgba(28, 126, 214, 0.25);
}
.fd-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fd-panel {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1640;
  box-shadow: 0 8px 20px rgba(20, 16, 50, 0.18);
  cursor: crosshair;
  touch-action: manipulation;
  border: 2px solid rgba(47, 156, 244, 0.45);
}
.fd-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 480;
  object-fit: contain;
  object-position: center;
  background: #1e293b;
  pointer-events: none;
  user-select: none;
  image-rendering: auto;
}
.fd-marks,
.fd-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fd-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  /* White ring like reference apps — not a green "difference" on the photo */
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(30, 40, 60, 0.35),
    0 0 10px rgba(255, 255, 255, 0.55);
  animation: fd-pop 0.35s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.fd-hint-pulse {
  border-color: #ffd43b !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 212, 59, 0.95) !important;
  animation: fd-pulse 0.7s ease-in-out infinite alternate;
}
.fd-miss {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #ff6b6b;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 80, 80, 0.8);
  animation: fd-miss 0.55s ease-out forwards;
}

.fd-banner {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 55%, #a855f7 100%);
  box-shadow: 0 6px 0 #4c1d95, 0 12px 28px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fd-banner-ico { font-size: 1.15em; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.2)); }
.fd-tier { font-style: normal; color: #7c3aed; font-weight: 900; }
.fd-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 3px 9px;
  pointer-events: none;
}
.fd-panel {
  border: 2px solid rgba(129, 140, 248, 0.65);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.22);
}
.fd-mark {
  border-width: 3px;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.45),
    0 0 14px rgba(255, 255, 255, 0.75),
    0 0 0 6px rgba(56, 189, 248, 0.25);
}

.fd-tip {
  margin: 0;
  text-align: center;
  font-size: clamp(0.82rem, 2.8vw, 0.95rem);
  font-weight: 700;
  color: #6b6b8a;
  line-height: 1.35;
}
.fd-win {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  animation: fd-win-in 0.35s ease;
  padding: 16px;
}
@keyframes fd-win-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fd-win-box {
  width: min(300px, 88%);
  text-align: center;
  background: linear-gradient(165deg, #fffdf7, #e0f2fe);
  border-radius: 20px;
  padding: 22px 16px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  border: 2px solid #7dd3fc;
}
.fd-win-emoji { font-size: 2.4rem; line-height: 1; }
.fd-win-box h3 {
  margin: 6px 0 4px;
  color: #0c4a6e;
  font-size: 1.45rem;
}
.fd-win-box p {
  margin: 0 0 14px;
  color: #0369a1;
  font-weight: 700;
  line-height: 1.35;
}
.fd-win-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fd-win-btn {
  display: block;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  font-size: 1.02rem;
  cursor: pointer;
  text-align: center;
}
.fd-win-next {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: 0 4px 0 #312e81;
}
.fd-win-again {
  color: #0c4a6e;
  background: #e0f2fe;
  box-shadow: 0 3px 0 #7dd3fc;
}
.fd-win-next:active, .fd-win-again:active { transform: translateY(2px); box-shadow: none; }
.fd-shake { animation: fd-shake 0.4s ease; }
@keyframes fd-pop {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes fd-pulse {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.7; }
  to { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}
@keyframes fd-miss {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1.2); }
}
@keyframes fd-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Legacy emoji spot panels (fallback) */
.spot-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
}
.spot-panel {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), 1fr);
  gap: 4px;
  width: min(340px, 84vw);
  padding: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.spot-cell {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #f5f3ff;
  font-size: clamp(1rem, 5vw, 1.6rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spot-cell.found { border-color: #34c759; background: #eafff0; }


/* Matchstick Puzzles (Game 81) */
.ms {
  width: min(560px, 98vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
  padding: 16px 14px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 220, 140, 0.18), transparent 42%),
    radial-gradient(circle at 90% 10%, rgba(255, 100, 80, 0.12), transparent 40%),
    linear-gradient(165deg, #2d8a58 0%, #145c38 48%, #0b3320 100%);
  box-shadow:
    0 16px 36px rgba(8, 40, 24, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.ms-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ms-level {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff8e7;
  text-shadow: 0 2px 0 rgba(0,0,0,0.28);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ms-level-ico { font-size: 1.05em; }
.ms-actions { display: flex; gap: 8px; }
.ms-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}
.ms-icon:active { transform: translateY(2px); box-shadow: none; }
.ms-hint {
  text-align: center;
  background: linear-gradient(180deg, rgba(12, 48, 30, 0.88), rgba(8, 32, 20, 0.92));
  color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(0.95rem, 3.2vw, 1.12rem);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 14px;
  line-height: 1.35;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.1),
    0 4px 12px rgba(0,0,0,0.18);
}
.ms-status {
  text-align: right;
  color: #ffe8a3;
  font-family: "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.ms-board-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, #1a5c3a, #0d3a24 55%, #082818);
  box-shadow:
    inset 0 0 48px rgba(0,0,0,0.35),
    inset 0 0 0 2px rgba(255, 220, 150, 0.12),
    0 14px 32px rgba(8, 40, 24, 0.4);
  min-height: 300px;
  padding: 20px 16px 24px;
}
.ms-felt {
  pointer-events: none;
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 230, 160, 0.18);
  opacity: 0.7;
}
.ms-board {
  position: relative;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
}
.ms-board.ms-geo {
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: min(420px, 82vw);
  width: min(100%, 420px);
}
.ms-board.ms-eq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 14px);
  min-height: 180px;
  flex-wrap: wrap;
  padding: 10px 4px;
}
.ms-stick {
  position: absolute;
  height: 14px;
  border: none;
  padding: 0;
  background: transparent;
  transform-origin: 0 50%;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.18s ease, filter 0.18s ease;
}
.ms-stick .ms-wood {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(255,255,255,0.22) 18%, transparent 32%),
    linear-gradient(180deg, #f6e0b0 0%, #e2b56a 38%, #c48a3c 72%, #a06a28 100%);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(80, 40, 10, 0.25);
}
.ms-stick .ms-head {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 32% 28%, #ff7a5c, #e0311f 42%, #7a1208 78%);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,200,180,0.45);
  z-index: 3;
}
.ms-stick.is-off {
  opacity: 0.28;
  filter: grayscale(0.55) brightness(0.92);
}
.ms-stick.is-off .ms-wood {
  background: linear-gradient(180deg, #b8c4b8, #7a877a 55%, #5a655a);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.ms-stick.is-off .ms-head {
  background: radial-gradient(circle at 35% 30%, #8a9090, #4a5050 70%);
}
.ms-stick.is-on:hover .ms-wood { filter: brightness(1.06); }
.ms-stick.is-picked {
  filter: drop-shadow(0 0 10px #ffe066) drop-shadow(0 0 4px #fff);
  z-index: 5;
}
.ms-char {
  position: relative;
  width: clamp(54px, 14vw, 78px);
  height: clamp(96px, 26vw, 130px);
  flex: 0 0 auto;
}
.ms-char-op, .ms-char-eq {
  width: clamp(36px, 10vw, 52px);
  display: grid;
  place-items: center;
}
.ms-op {
  color: #fff8e1;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,0.3);
}
.ms-seg { height: 10px; }
.ms-congrats {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  z-index: 8;
  background: rgba(8, 36, 22, 0.88);
  color: #fff;
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-size: clamp(1.4rem, 5vw, 2rem);
  padding: 12px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  animation: ms-pop 0.4s cubic-bezier(0.2, 1.3, 0.3, 1);
}
.ms-congrats[hidden] { display: none !important; }
@keyframes ms-pop {
  from { transform: translateX(-50%) scale(0.7); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}
.ms-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 28px;
}
.ms-tray-stick {
  width: 42px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6e0b0, #c48a3c);
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  position: relative;
}
.ms-tray-stick::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #ff7a5c, #c41e12 70%);
}
.ms-tip {
  margin: 0;
  text-align: center;
  color: #d8f5e4;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.95;
}
.ms-shake { animation: ms-shake 0.35s ease; }
@keyframes ms-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.activity-area:has(.ms) {
  background: transparent;
}

/* Ball Sort */
.sort-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3vw, 18px);
  padding: 22px 16px 16px;
  background: radial-gradient(circle at 50% 0%, #5b47a8, #362b6e);
  border-radius: 22px;
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.4), 0 12px 26px rgba(60, 35, 120, 0.35);
}
.sort-tube {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  width: 42px;
  padding: 5px 5px 8px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px 6px 22px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.35), inset -6px 0 10px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sort-tube::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 6px;
  bottom: 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}
.sort-tube.sel {
  transform: translateY(-10px);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.45), 0 0 0 3px rgba(255, 223, 90, 0.9), 0 12px 20px rgba(0, 0, 0, 0.3);
}
.sort-ball {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset 0 -5px 7px rgba(0, 0, 0, 0.4), inset 0 3px 5px rgba(255, 255, 255, 0.35), 0 2px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.sort-ball::before {
  content: "";
  position: absolute;
  top: 16%;
  left: 22%;
  width: 34%;
  height: 26%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  filter: blur(1px);
}
.sort-ball.lift { transform: translateY(-18px) scale(1.08); }
.sort-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.sort-btn {
  padding: 9px 20px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  color: #4a2f9e;
  background: linear-gradient(160deg, #ffffff, #ece6ff);
  box-shadow: 0 5px 12px rgba(90, 50, 160, 0.28), inset 0 2px 3px rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.sort-btn:active { transform: translateY(2px); }

/* Odd Colour Out */
.odd-board {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: 6px;
  width: min(340px, 84vw);
  aspect-ratio: 1;
}
.odd-tile {
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.odd-tile:active { transform: scale(0.95); }

/* Block Blast */
.bf-board {
  display: grid;
  grid-template-columns: repeat(var(--s, 8), 1fr);
  gap: 4px;
  width: min(384px, 90vw);
  aspect-ratio: 1;
  padding: 8px;
  background: linear-gradient(160deg, #4a3d8f, #6a4fb0);
  border-radius: 18px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(70, 40, 140, 0.35);
  touch-action: none;
}
.bf-cell {
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.08s ease;
}
.bf-cell.on {
  box-shadow: inset 0 3px 5px rgba(255, 255, 255, 0.45), inset 0 -4px 6px rgba(0, 0, 0, 0.3);
  animation: bf-pop 0.16s ease;
}
.bf-cell.bf-prevok {
  opacity: 0.75;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 3px 5px rgba(255, 255, 255, 0.4);
}
.bf-cell.bf-prevbad {
  background: rgba(255, 90, 95, 0.4) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 80, 90, 0.9);
}
@keyframes bf-pop {
  0% { transform: scale(0.6); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.bf-tray {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 4vw, 22px);
  margin-top: 12px;
  min-height: 84px;
}
.bf-piece {
  min-width: 66px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #efe9ff);
  box-shadow: 0 6px 14px rgba(90, 50, 160, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  cursor: grab;
  touch-action: none;
  transition: transform 0.1s ease;
}
.bf-piece:active { cursor: grabbing; }
.bf-piece.dragging { opacity: 0.3; transform: scale(0.9); }
.bf-piece.empty { opacity: 0.25; box-shadow: none; }
.bf-mini { display: grid; gap: 4px; }
.bf-dot { width: 15px; height: 15px; border-radius: 4px; background: transparent; }
.bf-dot.filled { box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.6), inset 0 -3px 4px rgba(0, 0, 0, 0.25); }
.bf-ghost {
  position: fixed;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(1.25);
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3));
}
.bf-ghost .bf-dot { width: 20px; height: 20px; border-radius: 5px; }

/* Coloring Fun */
.color-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.color-swatch {
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.color-swatch.sel { border-color: #333; transform: scale(1.15); }
/* ---------- Game 79: Ludo ---------- */
/* ===== Game 79 — Ludo (classic) ===== */
.ludo {
  width: min(540px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  user-select: none;
  padding: 0 4px;
}
.ludo-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.ludo-goal {
  font-weight: 900;
  color: #1e3a8a;
  background: linear-gradient(135deg, #e0e7ff, #dbeafe);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  border: 1px solid #93c5fd;
}
.ludo-msg {
  font-weight: 800;
  color: #0f766e;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  flex: 1;
  text-align: right;
  min-width: 140px;
}
.ludo-stage {
  position: relative;
  padding: 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.14), transparent 40%),
    linear-gradient(165deg, #0c2461 0%, #1e3a8a 45%, #0f2a5c 100%);
  box-shadow:
    0 14px 32px rgba(12, 36, 97, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.ludo-board {
  position: relative;
  width: min(500px, calc(100vw - 48px));
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 4px solid #f8fafc;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.55), 0 8px 20px rgba(0,0,0,0.25);
  background: #0f172a;
}
.ludo-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  width: 100%;
  height: 100%;
  gap: 1px;
  background: #1e293b;
  position: relative;
  z-index: 1;
}
.ludo-cell {
  position: relative;
  background: #fff;
  min-width: 0;
  min-height: 0;
}
.ludo-cell.path { background: #f8fafc; }
.ludo-cell.base.blue { background: #2563eb; }
.ludo-cell.base.red { background: #dc2626; }
.ludo-cell.base.green { background: #16a34a; }
.ludo-cell.base.yellow { background: #ca8a04; }
.ludo-cell.stretch.blue { background: #60a5fa; }
.ludo-cell.stretch.red { background: #f87171; }
.ludo-cell.stretch.green { background: #4ade80; }
.ludo-cell.stretch.yellow { background: #facc15; }
.ludo-cell.center { background: #0f172a; }
.ludo-cell.path.start.blue { background: #bfdbfe; }
.ludo-cell.path.start.red { background: #fecaca; }
.ludo-cell.path.start.green { background: #bbf7d0; }
.ludo-cell.path.start.yellow { background: #fef08a; }
.ludo-cell.safe .ludo-star {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: clamp(0.4rem, 1.6vw, 0.65rem);
  pointer-events: none;
}
.ludo-cell.yard-slot {
  background: transparent !important;
}
.ludo-yard-pad {
  position: absolute;
  z-index: 2;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: inset 0 0 0 3px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}
.ludo-yard-pad.blue { top: 8.5%; left: 8.5%; width: 24%; height: 24%; border: 3px solid #1d4ed8; }
.ludo-yard-pad.red { top: 8.5%; right: 8.5%; width: 24%; height: 24%; border: 3px solid #b91c1c; }
.ludo-yard-pad.green { bottom: 8.5%; right: 8.5%; width: 24%; height: 24%; border: 3px solid #15803d; }
.ludo-yard-pad.yellow { bottom: 8.5%; left: 8.5%; width: 24%; height: 24%; border: 3px solid #a16207; }

/* Center home diamond */
.ludo-center {
  position: absolute;
  z-index: 3;
  left: 40%;
  top: 40%;
  width: 20%;
  height: 20%;
  pointer-events: none;
}
.ludo-tri {
  position: absolute;
  width: 100%;
  height: 100%;
}
.ludo-tri.blue {
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}
.ludo-tri.red {
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}
.ludo-tri.green {
  clip-path: polygon(100% 0, 100% 100%, 50% 50%);
  background: linear-gradient(270deg, #22c55e, #15803d);
}
.ludo-tri.yellow {
  clip-path: polygon(0 100%, 100% 100%, 50% 50%);
  background: linear-gradient(0deg, #eab308, #a16207);
}
.ludo-home-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: clamp(0.45rem, 1.8vw, 0.7rem);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  letter-spacing: 0.06em;
  z-index: 1;
}

.ludo-pieces {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.ludo-token {
  pointer-events: auto;
  position: absolute;
  width: 5.6%;
  height: 5.6%;
  margin: 0;
  border: 2px solid rgba(255,255,255,0.85);
  padding: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35), inset 0 -3px 0 rgba(0,0,0,0.18);
  transition: left 0.14s linear, top 0.14s linear, transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  z-index: 5;
}
.ludo-token::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 34%;
  left: 18%;
  top: 16%;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
}
.ludo-token.blue { background: radial-gradient(circle at 35% 30%, #93c5fd, #1d4ed8); }
.ludo-token.red { background: radial-gradient(circle at 35% 30%, #fca5a5, #b91c1c); }
.ludo-token.green { background: radial-gradient(circle at 35% 30%, #86efac, #15803d); }
.ludo-token.yellow { background: radial-gradient(circle at 35% 30%, #fde047, #a16207); }
.ludo-token.stacked { width: 5%; height: 5%; }
.ludo-token.can-move {
  box-shadow: 0 0 0 3px #fde047, 0 0 14px rgba(253, 224, 71, 0.85);
  animation: ludo-pulse 0.7s ease-in-out infinite alternate;
  z-index: 8;
}
.ludo-token.is-home {
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.35);
  filter: brightness(1.08);
}
@keyframes ludo-pulse {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.14); }
}

.ludo-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ludo-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 2px solid transparent;
}
.ludo-panel.is-turn {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28);
}
.ludo-panel.blue { background: #dbeafe; }
.ludo-panel.red { background: #fee2e2; }
.ludo-panel.green { background: #dcfce7; }
.ludo-panel.yellow { background: #fef9c3; }
.ludo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.ludo-name { font-weight: 900; font-size: 0.9rem; color: #0f172a; }
.ludo-sub { font-weight: 700; font-size: 0.72rem; color: #475569; }
.ludo-dots {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.ludo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  border: 1px solid rgba(15,23,42,0.15);
}
.ludo-dot.yard { background: #cbd5e1; }
.ludo-dot.out { background: #38bdf8; }
.ludo-dot.done { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.25); }
.ludo-panel.red .ludo-dot.out { background: #f87171; }
.ludo-panel.green .ludo-dot.out { background: #4ade80; }
.ludo-panel.yellow .ludo-dot.out { background: #facc15; }
.ludo-panel.blue .ludo-dot.out { background: #60a5fa; }

.ludo-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.ludo-dice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 18px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 0 #14532d;
}
.ludo-dice-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}
.ludo-dice-btn.is-ready { animation: ludo-ready 1s ease infinite alternate; }
.ludo-dice-btn.is-rolling .ludo-die { animation: ludo-spin 0.18s linear infinite; }
.ludo-dice-label { font-size: 1.05rem; }

/* CSS pip die */
.ludo-die {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #e2e8f0);
  border: 2px solid #cbd5e1;
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 6px;
  gap: 2px;
  flex-shrink: 0;
}
.ludo-die .pip {
  width: 7px;
  height: 7px;
  margin: auto;
  border-radius: 50%;
  background: #0f172a;
  opacity: 0;
}
.ludo-die[data-face="0"] .pip { opacity: 0; }
.ludo-die[data-face="1"] .p5 { opacity: 1; }
.ludo-die[data-face="2"] .p1,
.ludo-die[data-face="2"] .p9 { opacity: 1; }
.ludo-die[data-face="3"] .p1,
.ludo-die[data-face="3"] .p5,
.ludo-die[data-face="3"] .p9 { opacity: 1; }
.ludo-die[data-face="4"] .p1,
.ludo-die[data-face="4"] .p3,
.ludo-die[data-face="4"] .p7,
.ludo-die[data-face="4"] .p9 { opacity: 1; }
.ludo-die[data-face="5"] .p1,
.ludo-die[data-face="5"] .p3,
.ludo-die[data-face="5"] .p5,
.ludo-die[data-face="5"] .p7,
.ludo-die[data-face="5"] .p9 { opacity: 1; }
.ludo-die[data-face="6"] .p1,
.ludo-die[data-face="6"] .p3,
.ludo-die[data-face="6"] .p4,
.ludo-die[data-face="6"] .p6,
.ludo-die[data-face="6"] .p7,
.ludo-die[data-face="6"] .p9 { opacity: 1; }

@keyframes ludo-ready {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}
@keyframes ludo-spin {
  from { transform: rotate(0); }
  to { transform: rotate(18deg); }
}
.ludo-reset {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  background: #e2e8f0;
  color: #334155;
}
.ludo-tip {
  margin: 0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1.35;
}
@media (max-width: 420px) {
  .ludo-stage { padding: 8px; border-radius: 16px; }
  .ludo-board { width: min(500px, calc(100vw - 36px)); }
  .ludo-die { width: 40px; height: 40px; }
}

/* ===== Game 80 — Chess ===== */
.chess {
  --chess-teal: #0f4f4a;
  --chess-teal-deep: #0a3633;
  --chess-gold: #d4a017;
  --chess-gold-bright: #f0c14b;
  --chess-cream: #f0d9b5;
  --chess-wood: #b58863;
  --chess-ink: #1a1a1a;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 10px 18px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.18), transparent 55%),
    linear-gradient(180deg, #12665f 0%, var(--chess-teal) 40%, var(--chess-teal-deep) 100%);
  box-shadow: 0 14px 36px rgba(15, 79, 74, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.chess-head {
  text-align: center;
  margin-bottom: 10px;
  padding: 6px 8px 10px;
  background: linear-gradient(180deg, #5c3a1e 0%, #3d2412 100%);
  border-radius: 14px;
  border: 1px solid rgba(212, 160, 23, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.2);
}
.chess-level {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--chess-gold-bright);
  text-shadow: 0 1px 0 #2a1808;
}
.chess-rank {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: #fff;
  line-height: 1.15;
  margin-top: 2px;
}
.chess-status {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fde68a;
  min-height: 1.2em;
}
.chess-board-wrap {
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #6b4423, #3e2614 55%, #2a180c);
  border: 2px solid rgba(212, 160, 23, 0.55);
  box-shadow:
    0 8px 0 #1a0f08,
    inset 0 2px 0 rgba(255, 220, 160, 0.25);
}
.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px #1a1208;
}
.chess-sq {
  position: relative;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: var(--chess-wood);
}
.chess-sq.light {
  background:
    linear-gradient(145deg, #f5e0c3, var(--chess-cream) 60%, #e8c99a);
}
.chess-sq.dark {
  background:
    linear-gradient(145deg, #c49a6c, #8b5a2b 55%, #6e4520);
}
.chess-sq.last {
  box-shadow: inset 0 0 0 3px #f5c518;
  background-image: linear-gradient(rgba(245, 197, 24, 0.35), rgba(245, 197, 24, 0.35));
}
.chess-sq.sel {
  box-shadow: inset 0 0 0 3px #22c55e;
  z-index: 1;
}
.chess-sq.move::after {
  content: "";
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.chess-sq.capture::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 3px solid rgba(34, 197, 94, 0.85);
  pointer-events: none;
}
.chess-sq.hint-from,
.chess-sq.hint-to {
  box-shadow: inset 0 0 0 3px #38bdf8;
}
.chess-sq.check {
  box-shadow: inset 0 0 0 3px #ef4444 !important;
  background-image: linear-gradient(rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.35)) !important;
}
.chess-coord {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 800;
  opacity: 0.75;
  pointer-events: none;
  line-height: 1;
}
.chess-sq.light .chess-coord { color: #6e4520; }
.chess-sq.dark .chess-coord { color: #f5e0c3; }
.chess-coord.rank { top: 3px; left: 4px; }
.chess-coord.file { bottom: 3px; right: 4px; }
.chess-piece {
  font-size: clamp(1.45rem, 8.2vw, 2.35rem);
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
  z-index: 2;
}
.chess-piece.white {
  color: #f8fafc;
  text-shadow:
    0 0 1px #111,
    0 1px 0 #cbd5e1,
    0 2px 3px rgba(0, 0, 0, 0.5);
}
.chess-piece.black {
  color: #111827;
  text-shadow:
    0 0 1px #fff,
    0 1px 0 #374151,
    0 2px 3px rgba(0, 0, 0, 0.55);
}
.chess-toolbar {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.chess-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--chess-gold);
  background:
    radial-gradient(circle at 35% 30%, #5a3a1f, #2a160c 70%);
  color: var(--chess-gold-bright);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 4px 0 #1a0f08,
    inset 0 1px 0 rgba(255, 220, 160, 0.25);
  transition: transform 0.12s ease;
}
.chess-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1a0f08;
}
.chess-tip {
  margin: 12px 6px 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.82);
  line-height: 1.35;
}
@media (max-width: 420px) {
  .chess { padding: 10px 6px 14px; border-radius: 16px; }
  .chess-btn { width: 46px; height: 46px; font-size: 1.2rem; }
}


/* ===== Game 77 — Cake Cook ===== */
.cake-cook {
  --cake-wall: #e8d5f5;
  --cake-body: #f6d86b;
  --cake-glaze: #f0a020;
  --cc-pink: #f472b6;
  --cc-wood: #a16207;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 8px 14px;
}
.cc-head { text-align: center; margin-bottom: 8px; }
.cc-title {
  font-weight: 900;
  font-size: 1.35rem;
  color: #9d174d;
  letter-spacing: 0.02em;
}
.cc-sub {
  font-weight: 700;
  font-size: 0.9rem;
  color: #be185d;
  opacity: 0.9;
}
.cc-recipe {
  background: linear-gradient(180deg, #fff7ed, #ffe4e6);
  border: 2px solid #fb7185;
  border-radius: 16px;
  padding: 8px 12px 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 0 rgba(251, 113, 133, 0.25);
}
.cc-recipe-label {
  font-weight: 900;
  color: #be185d;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cc-recipe-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.cc-recipe-list li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.82rem;
  color: #9f1239;
  border: 1.5px solid #fda4af;
}
.cc-recipe-list li.done {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
}
.cc-emoji { font-size: 1rem; }
.cc-progress {
  margin-top: 6px;
  font-weight: 900;
  color: #c2410c;
  font-size: 0.9rem;
}
.cc-stage { position: relative; }
.cc-kitchen {
  position: relative;
  height: min(58vw, 360px);
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #f9a8d4;
  box-shadow: 0 10px 28px rgba(190, 24, 93, 0.18);
  background: var(--cake-wall);
}
.cc-wall {
  position: absolute;
  inset: 0 0 32% 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(192, 132, 252, 0.22) 0 12px, transparent 13px),
    radial-gradient(circle at 55% 45%, rgba(192, 132, 252, 0.18) 0 10px, transparent 11px),
    radial-gradient(circle at 80% 25%, rgba(192, 132, 252, 0.2) 0 14px, transparent 15px),
    radial-gradient(circle at 35% 70%, rgba(192, 132, 252, 0.15) 0 9px, transparent 10px),
    linear-gradient(180deg, var(--cake-wall), color-mix(in srgb, var(--cake-wall) 80%, #fff));
}
.cc-counter {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background:
    linear-gradient(180deg, #d97706, #92400e 40%, #78350f);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.12);
  border-top: 4px solid #fbbf24;
}
.cc-prop {
  position: absolute;
  z-index: 2;
  font-size: 1.8rem;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,0.2));
  pointer-events: none;
}
.cc-bowl-left { left: 4%; bottom: 18%; font-size: 2.2rem; }
.cc-fruit-left { left: 14%; bottom: 14%; font-size: 1.6rem; }
.cc-pipe { right: 22%; bottom: 16%; font-size: 1.7rem; }
.cc-stand {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-58%);
  width: 52%;
  max-width: 220px;
  z-index: 3;
}
.cc-stand::after {
  content: "";
  display: block;
  width: 78%;
  height: 14px;
  margin: -2px auto 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fda4af, #fb7185);
  box-shadow: 0 4px 0 #be185d;
}
.cc-cake {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05;
  margin: 0 auto;
}
.cc-tier {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 18px 18px 22px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cake-body) 90%, #fff), var(--cake-body) 45%, color-mix(in srgb, var(--cake-body) 75%, #92400e));
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.45),
    0 6px 0 rgba(0,0,0,0.12);
}
.cc-tier.top {
  width: 58%;
  height: 34%;
  top: 12%;
  z-index: 2;
}
.cc-tier.bot {
  width: 86%;
  height: 42%;
  top: 40%;
  z-index: 1;
}
.cc-glaze {
  position: absolute;
  left: 4%; right: 4%; top: -6%;
  height: 42%;
  border-radius: 16px 16px 40% 40%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cake-glaze) 80%, #fff), var(--cake-glaze));
  box-shadow: 0 2px 0 rgba(0,0,0,0.08);
}
.cc-glaze::before,
.cc-glaze::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 14px;
  height: 22px;
  border-radius: 0 0 10px 10px;
  background: var(--cake-glaze);
}
.cc-glaze::before { left: 18%; }
.cc-glaze::after { right: 22%; width: 12px; }
.cc-dollops {
  position: absolute;
  inset: 8% 10% auto;
  display: flex;
  justify-content: space-between;
  z-index: 2;
  pointer-events: none;
}
.cc-dollop {
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 35% 30%, #fff7ed, #fde68a 60%, #f59e0b);
  box-shadow: 0 2px 0 rgba(0,0,0,0.12);
}
.cc-slot {
  position: absolute;
  width: 18%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  padding: 0;
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.cc-slot.open .cc-slot-dot {
  width: 34%;
  height: 34%;
  border-radius: 50%;
  background: rgba(244, 114, 182, 0.75);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.7);
  animation: cc-pulse 1s ease infinite alternate;
}
.cc-slot.filled .cc-placed {
  font-size: clamp(1.1rem, 5.5vw, 1.7rem);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25));
  animation: cc-pop 0.28s ease;
}
@keyframes cc-pulse {
  from { transform: scale(0.9); opacity: 0.7; }
  to { transform: scale(1.15); opacity: 1; }
}
@keyframes cc-pop {
  from { transform: scale(0.4); }
  to { transform: scale(1); }
}
.cc-menu {
  position: absolute;
  top: 8%;
  right: 3%;
  bottom: 38%;
  width: 22%;
  min-width: 64px;
  max-width: 92px;
  background: linear-gradient(180deg, #fff, #ffe4e6);
  border: 3px solid #fb7185;
  border-radius: 18px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(190, 24, 93, 0.18);
}
.cc-menu-heart {
  color: #fb7185;
  font-size: 0.95rem;
  line-height: 1;
  margin-bottom: 2px;
}
.cc-topping {
  width: 92%;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 2px 0 rgba(251, 113, 133, 0.2);
}
.cc-topping.selected {
  border-color: #f97316;
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35);
  transform: scale(1.04);
}
.cc-topping-emoji { font-size: 1.35rem; line-height: 1.1; }
.cc-topping-name {
  font-size: 0.55rem;
  font-weight: 800;
  color: #9f1239;
  line-height: 1.1;
}
.cc-toolbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cc-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
  background: #fce7f3;
  color: #9d174d;
  box-shadow: 0 3px 0 #f9a8d4;
}
.cc-btn.primary {
  background: linear-gradient(135deg, #fb7185, #f472b6);
  color: #fff;
  box-shadow: 0 3px 0 #be185d;
}
.cc-btn:active { transform: translateY(2px); box-shadow: none; }
.cc-tip {
  margin: 10px 4px 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #9d174d;
  line-height: 1.35;
}
@media (max-width: 420px) {
  .cc-kitchen { height: 340px; }
  .cc-stand { width: 56%; transform: translateX(-60%); }
  .cc-menu { width: 24%; min-width: 58px; }
  .cc-topping-name { display: none; }
}


/* ===== Trivia Master / Millionaire UI (Game 97) ===== */
body.trivia-master-page .activity-card {
  background: transparent;
  box-shadow: none;
  border: none;
}
body.trivia-master-page .activity-header,
body.trivia-master-page #activity-desc {
  display: none;
}
.tm {
  width: min(420px, 100%);
  margin: 0 auto;
}
.tm-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 14px 12px 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(167, 139, 250, 0.45), transparent 55%),
    radial-gradient(circle at 10% 0%, rgba(255,255,255,0.12), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255,255,255,0.12), transparent 28%),
    linear-gradient(180deg, #4c1d95 0%, #2e1065 42%, #1e0538 100%);
  box-shadow: 0 18px 40px rgba(46, 16, 101, 0.45);
  color: #fff;
}
.tm-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.tm-confetti span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  opacity: 0.75;
  transform: rotate(25deg);
}
.tm-nav,
.tm-view {
  position: relative;
  z-index: 1;
}
.tm-nav {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.tm-tab {
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: #e9d5ff;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.tm-tab.is-on {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #3b0764;
  border-color: #fde047;
}
.tm-logo { text-align: center; margin-bottom: 10px; }
.tm-logo-icons { font-size: 1.15rem; letter-spacing: 0.35rem; margin-bottom: 4px; }
.tm-logo-mark {
  display: inline-block;
  padding: 10px 22px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #6d28d9, #4c1d95);
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.85),
    0 0 18px rgba(196, 181, 253, 0.7),
    inset 0 0 20px rgba(255,255,255,0.12);
}
.tm-logo-trivia {
  display: block;
  font-size: clamp(1.55rem, 6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #7dd3fc;
  text-shadow: 0 2px 0 #1e3a8a, 0 0 12px rgba(125, 211, 252, 0.8);
  line-height: 1;
}
.tm-logo-master {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #fde047;
}
.tm-prize-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 12px;
  max-width: 280px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #1c1917;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 4px 0 #b45309, 0 0 16px rgba(250, 204, 21, 0.45);
}
.tm-laurel { opacity: 0.85; }
.tm-meta-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tm-chip {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #f5f3ff;
}
.tm-chip-gold {
  background: rgba(253, 224, 71, 0.18);
  border-color: rgba(253, 224, 71, 0.55);
  color: #fde68a;
}
.tm-question {
  margin: 0 8px 16px;
  text-align: center;
  font-size: clamp(1.15rem, 4.2vw, 1.4rem);
  line-height: 1.35;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.tm-opts {
  display: grid;
  gap: 10px;
  padding: 0 4px 14px;
}
.tm-opt {
  appearance: none;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: #fff;
  text-align: left;
  border: 2px solid rgba(224, 242, 254, 0.95);
  background: linear-gradient(180deg, #5b21b6, #3b0764 70%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 0 14px rgba(125, 211, 252, 0.35),
    0 6px 0 rgba(24, 8, 54, 0.55);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease, opacity 0.2s ease;
}
.tm-opt:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.35),
    0 0 18px rgba(125, 211, 252, 0.55),
    0 8px 0 rgba(24, 8, 54, 0.55);
}
.tm-opt:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(24, 8, 54, 0.55);
}
.tm-opt-letter {
  flex: 0 0 auto;
  color: #fde047;
  font-weight: 900;
  font-size: 1.05rem;
  min-width: 1.6rem;
}
.tm-opt-text {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 1.02rem;
  padding-right: 1.4rem;
}
.tm-opt.is-wrong {
  opacity: 0.38;
  filter: grayscale(0.7);
  pointer-events: none;
}
.tm-opt.is-right {
  border-color: #86efac;
  background: linear-gradient(180deg, #16a34a, #14532d);
  box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.6), 0 0 20px rgba(74, 222, 128, 0.45);
}
.tm-opt.is-dim { opacity: 0.4; }
.tm-opt:disabled { cursor: default; }
.tm-footer-banner {
  margin: 4px -12px 0;
  padding: 12px 10px 14px;
  text-align: center;
  background: linear-gradient(90deg, #db2777, #a21caf 50%, #7c3aed);
  font-weight: 900;
  font-size: clamp(0.85rem, 3.3vw, 1.05rem);
  letter-spacing: 0.04em;
}
.tm-footer-banner span { color: #fde047; }
.tm-footer-banner b { color: #fff; font-weight: 900; }
.tm-footer-alt { background: linear-gradient(90deg, #7e22ce, #db2777); }

/* Prize ladder */
.tm-ladder-head { text-align: center; margin-bottom: 8px; }
.tm-trophy { font-size: 2.4rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35)); }
.tm-ladder-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px auto 10px;
  max-width: 300px;
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #1c1917;
  font-weight: 900;
  box-shadow: 0 0 0 2px #fef3c7, 0 6px 16px rgba(0,0,0,0.25);
}
.tm-ladder-list {
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow: auto;
  padding: 0 4px 12px;
}
.tm-ladder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4c1d95, #2e1065);
  border: 2px solid rgba(165, 243, 252, 0.75);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
  font-weight: 800;
}
.tm-ladder-row.is-active {
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-color: #86efac;
  color: #fef9c3;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.55);
}
.tm-ladder-n { opacity: 0.9; min-width: 1.5rem; }
.tm-ladder-cash { letter-spacing: 0.02em; }

/* Leaderboard */
.tm-board-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fde047;
  margin: 4px 0 12px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.tm-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 8px;
  align-items: end;
  margin: 0 4px 14px;
  padding: 12px 8px 8px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12), transparent 50%),
    linear-gradient(180deg, rgba(219, 39, 119, 0.35), rgba(76, 29, 149, 0.5));
  border: 2px solid rgba(244, 114, 182, 0.55);
}
.tm-pod { text-align: center; }
.tm-pod-avatar {
  width: 48px;
  height: 48px;
  margin: 4px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 1.5rem;
  box-shadow: 0 0 0 3px #fde047;
}
.tm-pod-1 .tm-pod-avatar { width: 58px; height: 58px; font-size: 1.75rem; }
.tm-pod-name { font-weight: 800; font-size: 0.85rem; }
.tm-pod-score { color: #fde68a; font-weight: 900; font-size: 0.9rem; }
.tm-pod-block {
  margin-top: 6px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #7c3aed, #4c1d95);
  font-weight: 900;
  padding: 10px 0 8px;
}
.tm-pod-1 .tm-pod-block { padding: 22px 0 10px; background: linear-gradient(180deg, #a855f7, #6d28d9); }
.tm-pod-2 .tm-pod-block { padding: 14px 0 8px; }
.tm-rank-list { display: grid; gap: 7px; padding: 0 4px 12px; }
.tm-rank-row {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(46, 16, 101, 0.85);
  border: 1px solid rgba(216, 180, 254, 0.45);
  font-weight: 800;
}
.tm-rank-row.is-you {
  border-color: #fde047;
  box-shadow: 0 0 0 1px #fde047, 0 0 14px rgba(250, 204, 21, 0.35);
  background: rgba(88, 28, 135, 0.95);
}
.tm-rank-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
}
.tm-rank-score { color: #fde68a; }
@media (max-width: 420px) {
  .tm-opt { min-height: 48px; padding: 10px 14px; }
  .tm-ladder-list { max-height: 280px; }
}

/* Ludo mode menu + step motion */
.ludo-menu {
  display: grid;
  gap: 12px;
  padding: 18px 14px;
  border-radius: 22px;
  background: linear-gradient(165deg, #eff6ff, #ecfdf5);
  border: 2px solid rgba(30, 58, 138, 0.14);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  text-align: center;
}
.ludo-menu-badge {
  font-weight: 900;
  font-size: 1.1rem;
  color: #1e3a8a;
}
.ludo-menu-title {
  margin: 0;
  font-size: 1.25rem;
  color: #0f2744;
}
.ludo-menu-sub {
  margin: 0;
  color: #475569;
  font-weight: 700;
  font-size: 0.92rem;
}
.ludo-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  border: 2px solid #bfdbfe;
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 3px 0 rgba(30, 58, 138, 0.12);
}
.ludo-menu-btn strong { display: block; color: #0f2744; }
.ludo-menu-btn small { display: block; color: #64748b; font-weight: 700; margin-top: 2px; }
.ludo-menu-btn.primary {
  border-color: #86efac;
  background: linear-gradient(180deg, #fff, #f0fdf4);
}
.ludo-menu-btn:active { transform: translateY(2px); box-shadow: none; }
.ludo-menu-ico { font-size: 1.6rem; }
.ludo-menu-back {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
}
.ludo-modes {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  background: #e0e7ff;
  color: #1e3a8a;
}

/* Matchstick hint + done popup + bigger tap targets */
.ms-hint-btn { font-size: 1.05rem !important; }
.ms-stick .ms-hit {
  position: absolute;
  left: -8%;
  right: -8%;
  top: -14px;
  bottom: -14px;
  z-index: 1;
}
.ms-stick .ms-wood { position: relative; z-index: 2; }
.ms-stick .ms-head { z-index: 3; }
.ms-stick.is-hint {
  z-index: 6;
  filter: drop-shadow(0 0 10px #fde047) drop-shadow(0 0 4px #fff);
  outline: 2px solid #fde047;
  outline-offset: 4px;
  border-radius: 8px;
  animation: ms-hint-pulse 0.9s ease-in-out infinite;
}
@keyframes ms-hint-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px #fde047); }
  50% { filter: drop-shadow(0 0 16px #facc15) drop-shadow(0 0 6px #fff); }
}
.ms-done {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(6, 28, 18, 0.72);
  backdrop-filter: blur(2px);
  animation: ms-pop 0.35s ease;
}
.ms-done-box {
  width: min(300px, 88%);
  text-align: center;
  background: linear-gradient(165deg, #fffdf7, #e8fff0);
  border-radius: 20px;
  padding: 22px 18px 16px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
  border: 2px solid #86efac;
}
.ms-done-emoji { font-size: 2.4rem; line-height: 1; }
.ms-done-box h3 {
  margin: 6px 0 4px;
  color: #14532d;
  font-size: 1.55rem;
}
.ms-done-box p {
  margin: 0 0 14px;
  color: #3f6212;
  font-weight: 700;
  line-height: 1.35;
}
.ms-done-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 4px 0 #14532d;
}
.ms-done-btn:active { transform: translateY(2px); box-shadow: none; }


/* ADS_HIDDEN_UNTIL_APPROVAL */
.ad-slot,
.ad-rail-left,
.ad-rail-right,
.ad-top-banner,
.ad-bottom,
.ad-modal,
.page-ad-layout > .ad-slot,
.adventure-chapter-ad {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
body.has-ads .page-ad-layout {
  grid-template-columns: 1fr !important;
}
