* {
  box-sizing: border-box;
}

:root {
  --ink: #17202a;
  --paper: #fcfaf5;
  --panel: rgba(255,255,255,0.80);
  --line: rgba(23,32,42,0.12);
  --accent: #ff8d4d;
  --accent-2: #4eb6ff;
  --accent-3: #ffd86b;
  --accent-4: #79d39c;
  --brand-shadow: 0 20px 60px rgba(23,32,42,.10);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,225,160,.40), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(120,210,255,.26), transparent 28%),
    linear-gradient(180deg, #fff9ef 0%, #f2f7fb 48%, #f9f5ec 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 180px;
  height: 180px;
  background: #ffd86b;
  top: 140px;
  right: -50px;
}

.orb-2 {
  width: 140px;
  height: 140px;
  background: #7dd3fc;
  top: 520px;
  left: -40px;
}

.orb-3 {
  width: 120px;
  height: 120px;
  background: #f8a4d8;
  top: 980px;
  right: 80px;
}

.site-header, main, footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: var(--brand-shadow);
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  font-weight: 950;
  letter-spacing: .16em;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  line-height: 1;
}

.brand-sub {
  font-size: .92rem;
  opacity: .65;
  max-width: 520px;
}

.trust-strip {
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(23,32,42,.10);
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(23,32,42,.07);
  white-space: nowrap;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 0 28px;
}

.eyebrow {
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 900;
  opacity: .55;
  margin: 0 0 20px;
}

.hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(3.2rem, 9vw, 7.4rem);
  line-height: .91;
  letter-spacing: -.065em;
}

.intro {
  max-width: 690px;
  margin: 28px 0 0;
  font-size: clamp(1.06rem, 2vw, 1.32rem);
  line-height: 1.65;
  opacity: .74;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 26px 0 70px;
}

.world-card {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px 24px 22px;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  box-shadow: 0 12px 34px rgba(23,32,42,.06);
}

.world-card::before {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: currentColor;
  opacity: .05;
  transition: transform .35s ease;
}

.world-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 25px 60px rgba(23,32,42,.12);
  border-color: rgba(23,32,42,.24);
}

.world-card:hover::before {
  transform: scale(1.18);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-symbol {
  font-size: 2.7rem;
  flex: 0 0 auto;
}

.kids-symbol {
  font-size: 2.8rem;
}

.mini-scene {
  position: relative;
  width: 130px;
  height: 82px;
  flex: 0 0 auto;
}

.mini-board {
  background: linear-gradient(180deg, rgba(78,182,255,.18), rgba(78,182,255,.05));
  border: 1px solid rgba(78,182,255,.18);
  border-radius: 18px;
}

.board-grid {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  background-image:
    linear-gradient(rgba(23,32,42,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,32,42,.12) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}

.board-piece {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 6px 12px rgba(23,32,42,.14);
}

.piece-a { background: #ff8d4d; left: 28px; top: 22px; }
.piece-b { background: #4eb6ff; right: 26px; bottom: 20px; }

.mini-paper {
  background: linear-gradient(180deg, rgba(255,216,107,.20), rgba(255,216,107,.05));
  border: 1px solid rgba(255,216,107,.22);
  border-radius: 18px;
}

.paper-sheet {
  position: absolute;
  width: 62px;
  height: 46px;
  left: 35px;
  top: 18px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(23,32,42,.10);
  transform: rotate(-5deg);
}

.fold {
  position: absolute;
  width: 30px;
  height: 20px;
  background: #fff3c7;
  border-radius: 6px;
  border: 1px dashed rgba(23,32,42,.20);
}

.fold-1 { left: 22px; top: 36px; transform: rotate(-18deg); }
.fold-2 { right: 18px; top: 28px; transform: rotate(22deg); }

.mini-illusion {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(121,211,156,.16), rgba(121,211,156,.05));
  border: 1px solid rgba(121,211,156,.20);
  border-radius: 18px;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 4px solid rgba(23,32,42,.85);
}

.ring-1 { width: 60px; height: 60px; }
.ring-2 { width: 38px; height: 38px; border-style: dashed; }
.ring-3 { width: 12px; height: 12px; background: rgba(23,32,42,.9); border: none; }

.mini-kids {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  padding-bottom: 10px;
  background: linear-gradient(180deg, rgba(248,164,216,.17), rgba(248,164,216,.05));
  border: 1px solid rgba(248,164,216,.20);
  border-radius: 18px;
}

.kid-block {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  color: white;
  box-shadow: 0 8px 14px rgba(23,32,42,.12);
}

.block-a { background: #ff8d4d; margin-bottom: 8px; }
.block-b { background: #4eb6ff; height: 40px; }
.block-c { background: #79d39c; height: 26px; }

.card-body h2 {
  margin: 34px 0 9px;
  font-size: 1.75rem;
}

.card-body p {
  max-width: 460px;
  margin: 0;
  line-height: 1.5;
  opacity: .70;
}

.arrow {
  position: absolute;
  right: 24px;
  top: 20px;
  font-size: 1.85rem;
  transition: transform .25s ease;
}

.world-card:hover .arrow {
  transform: translateX(6px);
}

.promise {
  padding: 24px 0 100px;
  text-align: center;
}

.promise p {
  margin: 0;
  letter-spacing: -.03em;
}

.promise-main {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 850;
}

.promise-sub {
  margin-top: 8px !important;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 750;
  opacity: .72;
}

.placeholder-section {
  min-height: 60vh;
  padding: 100px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.placeholder-section span {
  font-size: .75rem;
  letter-spacing: .16em;
  font-weight: 800;
  opacity: .5;
}

.placeholder-section h2 {
  margin: 10px 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -.05em;
}

.placeholder-section p {
  font-size: 1.1rem;
  opacity: .65;
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 20px 48px;
  text-align: center;
  opacity: .55;
}

@media (max-width: 930px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-strip {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 20px;
  }

  .brand-wrap {
    align-items: flex-start;
  }

  .brand-sub {
    max-width: none;
  }

  .hero {
    min-height: 48vh;
    padding-top: 42px;
  }

  .worlds {
    grid-template-columns: 1fr;
  }

  .world-card {
    min-height: 250px;
  }

  .mini-scene {
    width: 112px;
    height: 74px;
  }
}


/* v0.4 inner pages */
.brand-link { color: inherit; text-decoration: none; }
.inner-header { padding-bottom: 20px; }
.back-link { color: var(--ink); font-weight: 800; text-decoration: none; opacity: .58; display: inline-block; margin-bottom: 26px; }
.back-link:hover { opacity: 1; }
.section-hero { padding: 70px 0 45px; }
.section-hero h1, .project-detail h1 { margin: 0; font-size: clamp(4rem, 10vw, 7.4rem); line-height: .9; letter-spacing: -.065em; }
.project-grid { display:grid; grid-template-columns: 1.35fr .65fr; gap:18px; padding:20px 0 100px; }
.project-card { min-height: 430px; border:1px solid var(--line); border-radius:30px; background:var(--panel); color:inherit; text-decoration:none; overflow:hidden; box-shadow:0 12px 34px rgba(23,32,42,.06); }
a.project-card { transition:transform .25s ease, box-shadow .25s ease; }
a.project-card:hover { transform:translateY(-6px); box-shadow:0 25px 60px rgba(23,32,42,.12); }
.project-preview { height:230px; position:relative; background:linear-gradient(135deg, rgba(78,182,255,.22), rgba(255,216,107,.23)); display:grid; place-items:center; }
.preview-grid { width:145px; height:145px; border:2px solid var(--ink); background-color:white; background-image:linear-gradient(var(--ink) 2px, transparent 2px),linear-gradient(90deg,var(--ink) 2px,transparent 2px); background-size:29px 29px; box-shadow:0 18px 30px rgba(23,32,42,.14); transform:rotate(-4deg); }
.preview-chip { position:absolute; top:18px; right:18px; background:var(--ink); color:white; border-radius:999px; padding:8px 12px; font-size:.72rem; font-weight:900; letter-spacing:.1em; }
.project-info { padding:28px; }
.project-meta { font-size:.74rem; letter-spacing:.12em; font-weight:900; opacity:.5; }
.project-info h2 { margin:10px 0 8px; font-size:2rem; }
.project-info p { line-height:1.55; opacity:.68; }
.project-cta { display:inline-block; margin-top:14px; font-weight:900; }
.coming-card { display:flex; flex-direction:column; justify-content:center; }
.coming-icon { margin:28px 28px 0; width:70px; height:70px; border-radius:22px; display:grid; place-items:center; font-size:2rem; font-weight:900; background:rgba(255,141,77,.18); }
.project-detail { display:grid; grid-template-columns:1.05fr .95fr; align-items:center; gap:65px; padding:72px 0 100px; }
.project-lead { max-width:600px; font-size:1.24rem; line-height:1.65; opacity:.72; }
.detail-badges { display:flex; gap:10px; flex-wrap:wrap; margin:26px 0; }
.detail-badges span { background:white; border:1px solid var(--line); padding:10px 14px; border-radius:999px; font-size:.82rem; font-weight:850; }
.action-row { display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
.primary-button,.secondary-button { display:inline-block; padding:15px 20px; border-radius:14px; text-decoration:none; font-weight:900; }
.primary-button { background:var(--ink); color:white; }
.secondary-button { background:white; color:var(--ink); border:1px solid var(--line); }
.tiny-note { font-size:.88rem; opacity:.52; margin-top:16px; }
.game-board-demo { aspect-ratio:1/1; display:grid; grid-template-columns:repeat(5,1fr); background:white; border:10px solid white; border-radius:28px; box-shadow:0 24px 65px rgba(23,32,42,.12); transform:rotate(2deg); overflow:hidden; }
.demo-cell { border-right:2px solid var(--ink); border-bottom:2px solid var(--ink); display:grid; place-items:center; min-width:0; }
.demo-cell:nth-child(5n) { border-right:0; }
.demo-cell:nth-child(n+21) { border-bottom:0; }
.demo-cell.bonus { background:#fff0d4; font-size:clamp(.55rem,1.3vw,.9rem); font-weight:900; }
.rules-panel { border-top:1px solid var(--line); padding:80px 0 100px; display:grid; grid-template-columns:.8fr 1.2fr; gap:80px; }
.rules-panel h2 { margin:8px 0; font-size:clamp(2.2rem,4vw,4rem); letter-spacing:-.05em; }
.rules-panel ol { margin:0; padding-left:1.5rem; font-size:1.08rem; line-height:1.75; }
@media (max-width: 800px) {
  .project-grid, .project-detail, .rules-panel { grid-template-columns:1fr; }
  .project-detail { gap:42px; }
  .project-grid { padding-bottom:70px; }
  .game-board-demo { width:min(100%,520px); margin:0 auto; }
}



/* --- v0.4+ inner pages --- */
.brand-link {
  color: inherit;
  text-decoration: none;
}

.inner-header {
  padding-bottom: 24px;
}

.section-hero {
  padding: 18px 0 24px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  opacity: .72;
}

.back-link:hover {
  opacity: 1;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 20px;
  padding: 18px 0 70px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 30px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(23,32,42,.10);
  box-shadow: 0 14px 34px rgba(23,32,42,.06);
  text-decoration: none;
  color: inherit;
}

.project-card.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(23,32,42,.10);
}

.project-visual {
  position: relative;
}

.project-logo-image {
  width: 100%;
  display: block;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.9));
  box-shadow: inset 0 0 0 1px rgba(23,32,42,.06);
}

.preview-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #17202A;
  color: white;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.project-info h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 10px 0 8px;
  letter-spacing: -.04em;
}

.project-meta {
  font-size: .82rem;
  letter-spacing: .14em;
  font-weight: 800;
  opacity: .55;
}

.project-info p {
  line-height: 1.62;
  opacity: .72;
  margin: 0 0 18px;
}

.project-cta {
  font-weight: 800;
}

.coming-card {
  grid-template-columns: 88px 1fr;
  align-items: center;
  min-height: 220px;
}

.coming-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,141,77,.16), rgba(78,182,255,.16));
  font-size: 2rem;
  font-weight: 900;
}

.project-detail {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 30px;
  align-items: start;
  padding: 10px 0 54px;
}

.title-with-logo {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 8px;
}

.title-logo {
  width: 100%;
  max-width: 170px;
  border-radius: 20px;
  display: block;
  background: rgba(255,255,255,.85);
}

.project-copy h1 {
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  margin: 0;
  line-height: .95;
  letter-spacing: -.05em;
}

.project-lead {
  margin-top: 10px;
  font-size: 1.1rem;
  line-height: 1.65;
  opacity: .74;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 24px;
}

.detail-badges span {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(23,32,42,.08);
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 800;
  font-size: .9rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  display: inline-block;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform .18s ease;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button {
  background: #17202A;
  color: white;
}

.secondary-button {
  background: rgba(255,255,255,.88);
  color: inherit;
  border: 1px solid rgba(23,32,42,.10);
}

.tiny-note {
  margin-top: 14px;
  opacity: .65;
  font-size: .95rem;
}

.game-board-demo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  background: rgba(255,255,255,.88);
  padding: 10px;
  border-radius: 30px;
  border: 1px solid rgba(23,32,42,.08);
  box-shadow: 0 14px 34px rgba(23,32,42,.06);
}

.demo-cell {
  border: 2px solid #17202A;
  min-height: 72px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.demo-cell.bonus {
  background: #F1E3C6;
}

.rules-panel {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  padding: 20px 0 90px;
  border-top: 1px solid rgba(23,32,42,.10);
}

.rules-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -.04em;
}

.rules-panel ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
  font-size: 1.04rem;
}

@media (max-width: 980px) {
  .project-grid,
  .project-detail,
  .rules-panel {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .title-with-logo {
    grid-template-columns: 1fr;
  }

  .title-logo {
    max-width: 210px;
  }

  .game-board-demo {
    max-width: none;
  }

  .demo-cell {
    min-height: 54px;
  }
}



.game-hero-visual {
  max-width: 520px;
  background: rgba(255,255,255,.88);
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(23,32,42,.08);
  box-shadow: 0 14px 34px rgba(23,32,42,.06);
}

.hero-game-image {
  width: 100%;
  display: block;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.9));
}

@media (max-width: 720px) {
  .game-hero-visual {
    max-width: none;
  }
}


/* --- v1.0 game library --- */
.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.library-card {
  grid-template-columns: 180px 1fr;
  min-height: 250px;
}

.library-card .project-logo-image {
  aspect-ratio: 320 / 220;
  object-fit: cover;
}

.library-card .project-info h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

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

@media (max-width: 720px) {
  .library-card {
    grid-template-columns: 1fr;
  }
}

.privacy-copy{font-size:1.05rem;line-height:1.75;opacity:.78}


/* --- v1.4 Kids interactive activities --- */
.kid-play-panel{
  padding:32px 0 90px;
  border-top:1px solid rgba(23,32,42,.10);
}
.kid-play-head{
  display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:22px;
}
.kid-play-head h2{margin:8px 0 0;font-size:clamp(2rem,4vw,3.2rem);letter-spacing:-.04em}
.kid-status{font-weight:800;background:rgba(255,255,255,.85);padding:12px 16px;border-radius:999px;border:1px solid rgba(23,32,42,.08)}
.kid-game{
  min-height:330px;background:rgba(255,255,255,.84);border:1px solid rgba(23,32,42,.08);
  border-radius:30px;padding:24px;box-shadow:0 14px 34px rgba(23,32,42,.06);
}
.kid-reset{margin-top:16px;border:0;cursor:pointer}
.kid-target-word{text-align:center;font-size:clamp(2.8rem,8vw,5rem);font-weight:900;letter-spacing:-.04em;margin:18px 0 28px}
.kid-choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.kid-color-btn,.shape-btn,.number-btn,.odd-btn{
  min-height:86px;border:0;border-radius:22px;cursor:pointer;font-size:2rem;font-weight:900;
  box-shadow:0 8px 20px rgba(23,32,42,.08);background:white;color:#17202A;
}
.shape-target{text-align:center;font-size:6rem;margin:10px 0 24px}
.memory-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:520px;margin:0 auto}
.memory-card{aspect-ratio:1;border:0;border-radius:18px;background:#e8edf2;font-size:2rem;font-weight:900;cursor:pointer}
.memory-card.open,.memory-card.done{background:white}
.star-area{position:relative;min-height:300px;background:linear-gradient(180deg,#f8fbff,#fff7e9);border-radius:24px;overflow:hidden}
.tap-star{position:absolute;border:0;background:transparent;font-size:4rem;cursor:pointer;transform:translate(-50%,-50%)}
.number-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:560px;margin:0 auto}
.number-btn.done{opacity:.2}
.maze-board{display:grid;grid-template-columns:repeat(8,1fr);max-width:520px;margin:0 auto;background:#f8fafc;border:2px solid #17202A}
.maze-cell{aspect-ratio:1;display:grid;place-items:center;font-size:1.3rem;border:1px solid rgba(23,32,42,.08)}
.maze-cell.wall{background:#17202A}
.maze-controls{display:grid;grid-template-columns:repeat(4,72px);gap:10px;justify-content:center;margin:14px 0}
.maze-controls button{height:58px;border:0;border-radius:16px;background:white;font-size:1.5rem;font-weight:900;cursor:pointer}
.odd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:520px;margin:0 auto}
.pattern-row{display:flex;justify-content:center;gap:18px;font-size:3rem;margin:28px 0 32px;flex-wrap:wrap}
.pattern-row div{min-width:56px;text-align:center}
@media(max-width:720px){
  .kid-play-head{align-items:flex-start;flex-direction:column}
  .kid-choice-grid{grid-template-columns:repeat(2,1fr)}
  .memory-grid,.number-grid,.odd-grid{grid-template-columns:repeat(3,1fr)}
  .maze-controls{grid-template-columns:repeat(4,1fr)}
}


/* --- v1.5 older-kids challenge activities --- */
.older-play-panel{padding:30px 0 90px;border-top:1px solid rgba(23,32,42,.10)}
.challenge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:620px;margin:18px auto}
.challenge-btn{min-height:72px;border:0;border-radius:18px;background:white;font-size:1.35rem;font-weight:900;cursor:pointer;box-shadow:0 8px 20px rgba(23,32,42,.08);color:#17202A}
.big-sequence,.challenge-prompt{text-align:center;font-weight:900;letter-spacing:-.02em;margin:26px 0;font-size:clamp(1.7rem,5vw,3rem)}
.route-grid,.coordinate-grid,.matrix-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;max-width:440px;margin:18px auto}
.route-cell,.coordinate-cell,.matrix-mini>div{aspect-ratio:1;display:grid;place-items:center;background:white;border:1px solid rgba(23,32,42,.12);border-radius:12px;font-weight:800}
.coordinate-cell{cursor:pointer;font-size:1rem}
.matrix-mini{grid-template-columns:repeat(3,1fr);max-width:330px}
.matrix-mini>div{font-size:2rem}
@media(max-width:720px){.challenge-grid{grid-template-columns:repeat(2,1fr)}}

/* --- v1.6 brand refinement + multilingual UI --- */
.brand-mark{
  width:48px !important;
  height:48px !important;
  border-radius:14px !important;
  display:grid !important;
  place-items:center !important;
  font-size:35px !important;
  line-height:1 !important;
  font-weight:800 !important;
  overflow:hidden;
}
.brand-mark::first-letter{line-height:1}

.language-select-wrap{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(23,32,42,.10);
  box-shadow:0 6px 18px rgba(23,32,42,.04);
  white-space:nowrap;
}
.language-icon{font-size:16px}
#mw-language-select{
  appearance:auto;
  border:0;
  outline:0;
  background:transparent;
  color:#17202A;
  font:inherit;
  font-size:.88rem;
  font-weight:800;
  cursor:pointer;
}
.site-header{gap:14px}
.rtl{text-align:right}
.rtl .language-select-wrap{margin-left:0;margin-right:auto}
.rtl .brand-wrap,.rtl .title-with-logo,.rtl .kid-play-head{direction:rtl}
.rtl .project-cta,.rtl .back-link{direction:rtl}
.rtl .action-row{justify-content:flex-start}
.rtl ol,.rtl ul{padding-right:1.4em;padding-left:0}
@media(max-width:760px){
  .site-header{flex-wrap:wrap}
  .language-select-wrap{order:3;margin-left:0}
  .rtl .language-select-wrap{margin-right:0}
}


/* --- v1.6.1 polish fixes --- */

/* Better header structure for brand + promise + language */
.site-header{
  display:grid !important;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:14px 18px !important;
}

/* Brand mark: visually centered star */
.brand-mark{
  width:50px !important;
  height:50px !important;
  min-width:50px !important;
  min-height:50px !important;
  border-radius:15px !important;
  position:relative !important;
  font-size:0 !important;
  line-height:1 !important;
  display:grid !important;
  place-items:center !important;
  overflow:hidden !important;
}
.brand-mark::before{
  content:"✦";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-52%);
  font-size:31px;
  font-weight:900;
  line-height:1;
  color:#17202A;
}

/* Free / no sign-up text: no bubble, cleaner placement */
.trust-strip{
  justify-self:end;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;
  white-space:nowrap;
  font-size:.86rem !important;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.72;
}

/* Language selector should sit neatly without fighting layout */
.language-select-wrap{
  margin-left:0 !important;
  justify-self:end;
}

/* Hero typography: reduce overly tight tracking so letters don't merge */
.hero h1{
  letter-spacing:-0.035em !important;
  line-height:.94 !important;
  text-rendering:optimizeLegibility;
  font-kerning:normal;
  font-variant-ligatures:none;
}

/* Slight brand typography cleanup */
.brand{
  letter-spacing:.135em !important;
}

/* Clean mobile stacking */
@media (max-width: 920px){
  .site-header{
    grid-template-columns: 1fr auto;
    align-items:start;
  }
  .brand-wrap{
    grid-column:1 / -1;
  }
  .trust-strip{
    grid-column:1 / 2;
    justify-self:start;
    margin-top:4px !important;
  }
  .language-select-wrap{
    grid-column:2 / 3;
    justify-self:end;
    margin-top:0 !important;
  }
}

@media (max-width: 640px){
  .site-header{
    grid-template-columns:1fr;
    gap:10px !important;
  }
  .brand-wrap,
  .trust-strip,
  .language-select-wrap{
    grid-column:auto;
    justify-self:start;
  }
  .trust-strip{
    white-space:normal;
  }
}

/* RTL support for new header layout */
.rtl .site-header{
  direction:rtl;
}
.rtl .trust-strip,
.rtl .language-select-wrap{
  justify-self:start;
}


/* --- v1.7 privacy-first analytics dashboard --- */
.footer-link{
  color:inherit;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid rgba(23,32,42,.24);
}
.footer-link:hover{border-bottom-color:rgba(23,32,42,.72)}
.privacy-copy{font-size:1.04rem;line-height:1.75;opacity:.78}
.stats-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  padding:0 0 30px;
}
.stat-card{
  background:rgba(255,255,255,.86);
  border:1px solid rgba(23,32,42,.09);
  border-radius:22px;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.stat-card strong{font-size:2rem;letter-spacing:-.04em}
.stat-card span{opacity:.62;font-weight:800}
.stats-section{padding:20px 0 45px}
.stats-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:16px}
.stats-head h2{font-size:clamp(1.7rem,3vw,2.6rem);margin:5px 0 0}
.stats-list{display:grid;gap:9px}
.stats-row{
  display:grid;
  grid-template-columns:1.6fr repeat(4,.65fr);
  gap:12px;
  align-items:center;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(23,32,42,.08);
  border-radius:15px;
  padding:13px 15px;
}
.stats-row strong{text-transform:none}
.stats-row span{opacity:.66;font-size:.92rem}
.stats-clear{border:0;cursor:pointer}
@media(max-width:760px){
  .stats-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats-row{grid-template-columns:1fr 1fr}
}


/* --- v1.8 launch prep / mobile / accessibility --- */
html{scroll-behavior:smooth}
body{-webkit-text-size-adjust:100%}
a,button,select{-webkit-tap-highlight-color:transparent}
a:focus-visible,button:focus-visible,select:focus-visible{
  outline:3px solid rgba(255,141,77,.62);
  outline-offset:3px;
}
.primary-button,.secondary-button,.project-cta,.back-link{
  min-height:44px;
}
.primary-button,.secondary-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.project-card{
  content-visibility:auto;
  contain-intrinsic-size:320px;
}
.project-logo-image,.hero-game-image{
  max-width:100%;
  height:auto;
}
.error-hero{min-height:58vh}
.error-hero .action-row{margin-top:28px}

@media(max-width:760px){
  main{width:min(100% - 28px,1180px)}
  .hero{min-height:auto;padding:44px 0 20px}
  .hero h1{font-size:clamp(3rem,16vw,5.1rem)!important}
  .worlds{grid-template-columns:1fr}
  .world-card{min-height:245px}
  .project-detail{grid-template-columns:1fr!important}
  .game-hero-visual{order:-1}
  .action-row{display:flex;flex-wrap:wrap;gap:10px}
  .primary-button,.secondary-button{width:100%}
  .project-grid.library-grid{grid-template-columns:1fr}
  .project-card.library-card{min-height:0}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}


/* --- v2.2 advertising preparation --- */
.project-ad-wrap{
  width:min(100%,760px);
  margin:20px auto 8px;
}
.project-ad-slot{display:none}
.project-ad-slot.ad-slot-live{
  display:block;
  min-height:90px;
  padding:14px 0 4px;
  border-top:1px solid rgba(23,32,42,.08);
}
.ad-label{
  margin-bottom:8px;
  text-align:center;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
  opacity:.42;
}
@media(max-width:760px){
  .project-ad-wrap{width:100%;margin-top:16px}
}
