/* ==========================================================
   Likkle Coders v2 — shared styles for standalone HTML pages
   Pages that link this file:
     dashboard.html, play.html, chess-learn.html, chess-practice.html,
     tots.html, tots-letters.html, tots-numbers.html, tots-colors.html,
     tots-stories.html
   This file uses tokens defined in css/styles.css (--jf-green, etc).
   Pages should link styles.css FIRST, then this file.
   ========================================================== */

/* ---------- v2 page shell ---------- */
.v2-body{
  background: var(--c-page, #e7eefc);
  color: var(--c-ink, #15161c);
  font-family: 'Nunito', system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
}
.v2-header{
  background: #fff;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(20,15,30,.06);
  position: sticky;
  top: 0;
  z-index: 30;
}
.v2-brand{
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--c-ink, #15161c);
}
.v2-brand-mark{
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--c-ink, #15161c);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: .9rem;
}
.v2-brand-name{
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.v2-brand-name em{ font-style: normal; color: var(--c-coral, #ff6b3d); }
.v2-nav{ display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.v2-nav a{
  text-decoration: none;
  color: var(--c-ink, #15161c);
  font-weight: 700;
  font-size: .95rem;
}
.v2-nav a:hover{ color: var(--c-coral, #ff6b3d); }
.v2-back-btn{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid rgba(20,15,30,.12);
  font-weight: 700;
  font-size: .9rem;
  color: var(--c-ink, #15161c);
  text-decoration: none;
  margin: 1rem 0 0 1rem;
}
.v2-back-btn:hover{
  background: var(--jf-green, #009b3a);
  color: #fff;
  border-color: var(--jf-green-dark, #007a2e);
}

.v2-main{
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 2rem);
}
.v2-page-title{
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: .5rem 0;
  text-align: center;
}
.v2-page-sub{
  text-align: center;
  color: var(--c-ink-soft, #555);
  margin: 0 auto 2rem;
  max-width: 680px;
}

/* ---------- Profile bar (used on dashboard) ---------- */
.v2-profile{
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  box-shadow: 0 4px 12px rgba(20,15,30,.06);
}
.v2-avatar{
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jf-green, #009b3a), var(--jf-green-dark, #007a2e));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
}
.v2-profile-info{ flex: 1; min-width: 140px; }
.v2-profile-eyebrow{
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-ink-soft, #555);
  font-weight: 700;
}
.v2-profile-name{
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  margin: 0;
}
.v2-profile-stats{ display: flex; gap: 1.2rem; flex-wrap: wrap; }
.v2-stat{
  display: flex; flex-direction: column; align-items: center;
  font-size: .85rem;
}
.v2-stat strong{
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  color: var(--c-ink, #15161c);
}

/* ---------- Module tiles (dashboard) ---------- */
.v2-modules{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.v2-module{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem 1.3rem;
  border-radius: 22px;
  text-decoration: none;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px -10px rgba(20,15,30,.18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.v2-module:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -12px rgba(20,15,30,.28);
}
.v2-module .v2-mod-icon{
  font-size: 2.4rem;
  line-height: 1;
}
.v2-module h3{
  margin: .55rem 0 .3rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
}
.v2-module p{
  margin: 0;
  font-size: .92rem;
  line-height: 1.4;
  opacity: .9;
}
.v2-module .v2-mod-cta{
  margin-top: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-weight: 700;
  font-size: .9rem;
}
/* Jamaica flag accent variants */
.v2-mod-learn{ background: var(--jf-green, #009b3a); color: #fff; }
.v2-mod-code{ background: var(--jf-gold, #FFD100); color: var(--jf-black, #000); }
.v2-mod-play{ background: var(--jf-black, #000); color: var(--jf-gold, #FFD100); }
.v2-mod-tots{
  background: linear-gradient(135deg, #fda4af 0%, #ff8a5b 50%, #60a5fa 100%);
  color: #fff;
}

/* ---------- Footer ---------- */
.v2-footer{
  background: var(--c-ink, #15161c);
  color: #fff;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  margin-top: 3rem;
  text-align: center;
  font-size: .9rem;
}
.v2-footer p{ margin: .3rem 0; }
.v2-footer a{ color: var(--jf-gold, #FFD100); }

/* ---------- Modal (name prompt etc) ---------- */
.v2-modal-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.v2-modal{
  background: #fff;
  border-radius: 22px;
  padding: 2rem 1.6rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.v2-modal h3{
  font-family: 'Fredoka', sans-serif;
  margin: 0 0 .6rem;
}
.v2-modal input{
  width: 100%;
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 2px solid rgba(20,15,30,.12);
  font-size: 1.05rem;
  font-family: inherit;
  margin: .8rem 0;
  text-align: center;
}
.v2-modal input:focus{
  outline: none;
  border-color: var(--jf-green, #009b3a);
}
.v2-btn{
  display: inline-block;
  background: var(--jf-green, #009b3a);
  color: #fff;
  border: 0;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.v2-btn:hover{ background: var(--jf-green-dark, #007a2e); }
.v2-btn-ghost{
  background: transparent;
  color: var(--c-ink, #15161c);
  border: 2px solid rgba(20,15,30,.18);
}
.v2-btn-ghost:hover{ background: rgba(20,15,30,.05); }

/* ============================================================
   PLAY (Think & Play) page
   ============================================================ */
.v2-tier-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.v2-tier-card{
  background: #fff;
  border-radius: 22px;
  padding: 1.6rem 1.4rem;
  text-decoration: none;
  color: var(--c-ink, #15161c);
  box-shadow: 0 8px 22px -8px rgba(20,15,30,.15);
  border-top: 6px solid;
  transition: transform .2s ease, box-shadow .2s ease;
}
.v2-tier-card:hover{ transform: translateY(-4px); }
.v2-tier-card.tier-learn{ border-top-color: var(--jf-green, #009b3a); }
.v2-tier-card.tier-practice{ border-top-color: var(--jf-gold, #FFD100); }
.v2-tier-card .v2-tier-icon{ font-size: 2.6rem; line-height: 1; }
.v2-tier-card h3{
  font-family: 'Fredoka', sans-serif;
  margin: .5rem 0 .3rem;
  font-size: 1.4rem;
}
.v2-tier-card p{ margin: 0; line-height: 1.5; }

/* ============================================================
   CHESS pages — supports chessboard.js
   ============================================================ */
.v2-chess-shell{
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1fr;
  gap: 1.4rem;
  margin-top: 1.4rem;
}
.v2-chess-board-wrap{
  background: #fff;
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: 0 8px 22px -8px rgba(20,15,30,.15);
}
.v2-chess-board{
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.v2-chess-side{
  background: #fff;
  border-radius: 22px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 8px 22px -8px rgba(20,15,30,.15);
}
.v2-chess-status{
  background: var(--jf-green, #009b3a);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-align: center;
  margin-bottom: .8rem;
}
.v2-chess-controls{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.v2-chess-controls select,
.v2-chess-controls button{
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(20,15,30,.12);
  background: #fff;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
}
.v2-chess-history{
  max-height: 200px;
  overflow-y: auto;
  background: rgba(20,15,30,.04);
  border-radius: 12px;
  padding: .6rem;
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: .85rem;
}
.v2-captured{
  margin-top: .8rem;
  font-size: 1.4rem;
  min-height: 2rem;
}

/* Lesson-step layout for chess-learn */
.v2-lesson{
  background: #fff;
  border-radius: 22px;
  padding: 1.4rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 8px 22px -8px rgba(20,15,30,.12);
}
.v2-lesson h3{
  font-family: 'Fredoka', sans-serif;
  margin: 0 0 .6rem;
  color: var(--jf-green-dark, #007a2e);
}
.v2-lesson p{ margin: 0 0 .8rem; line-height: 1.55; }
.v2-lesson .v2-anansi-tip{
  background: rgba(254,209,0,.18);
  border-left: 5px solid var(--jf-gold, #FFD100);
  padding: .8rem 1rem;
  border-radius: 8px;
  margin: .8rem 0;
  font-size: .92rem;
}

/* Mobile responsive */
@media (max-width: 720px){
  .v2-chess-shell{ grid-template-columns: 1fr; }
}

/* ============================================================
   LIKKLE TOTS — pre-primary visual override
   Huge buttons, friendly fonts, audio-first, bright colors
   ============================================================ */
.tots-body{
  background: linear-gradient(180deg, #fff5f0 0%, #fde6f0 100%);
  font-family: 'Comic Sans MS', 'Comic Sans', 'Nunito', sans-serif;
}
.tots-header{
  background: #fff;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px dashed #fda4af;
}
.tots-title{
  font-family: 'Comic Sans MS', 'Comic Sans', 'Fredoka', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 1rem 0;
  text-align: center;
  color: #ff6b3d;
  text-shadow: 3px 3px 0 #fff, 5px 5px 0 #fda4af;
}
.tots-tap-prompt{
  text-align: center;
  font-size: 1.3rem;
  color: #ff6b3d;
  margin: 0 0 1.5rem;
  animation: tots-bounce 1.6s ease-in-out infinite;
}
@keyframes tots-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Big tots tiles for the landing page */
.tots-tiles{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  max-width: 800px;
  margin: 0 auto;
}
.tots-tile{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  border-radius: 32px;
  text-decoration: none;
  color: #fff;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  min-height: 180px;
  box-shadow: 0 10px 0 rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  border: 0;
}
.tots-tile:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 0 rgba(0,0,0,.18);
}
.tots-tile-icon{
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: .6rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.2));
}
.tots-letters{ background: linear-gradient(135deg, #ff6b3d, #fda4af); }
.tots-numbers{ background: linear-gradient(135deg, #60a5fa, #818cf8); }
.tots-colors{ background: linear-gradient(135deg, #fde68a, #fbbf24); color: #15161c; }
.tots-stories{ background: linear-gradient(135deg, #34d399, #22c55e); }

/* Letters / numbers / colors grids */
.tots-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto 2rem;
}
.tots-cell{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 24px;
  padding: 1rem .5rem;
  min-height: 130px;
  font-size: 3rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--c-ink, #15161c);
  border: 4px solid transparent;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tots-cell:hover, .tots-cell:focus{
  transform: translateY(-3px) scale(1.04);
  border-color: #ff6b3d;
  outline: none;
}
.tots-cell-sub{
  font-size: .9rem;
  color: var(--c-ink-soft, #555);
  margin-top: .3rem;
  font-weight: 600;
}

/* Detail panel — shown when a tot taps a letter/number/color */
.tots-detail{
  background: #fff;
  border-radius: 32px;
  padding: 2.4rem 1.5rem;
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 600px;
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
  border: 6px solid #ff6b3d;
}
.tots-detail-big{
  font-size: clamp(6rem, 16vw, 10rem);
  line-height: 1;
  font-family: 'Comic Sans MS', 'Fredoka', sans-serif;
  font-weight: 800;
  margin: 0;
}
/* Letter-tracing canvas — finger or stylus to trace the ghost letter */
.tots-trace-wrap{
  position: relative;
  width: clamp(220px, 60vw, 320px);
  height: clamp(220px, 60vw, 320px);
  margin: 0 auto 1rem;
  background: #fff8f1;
  border: 4px dashed #ffb38a;
  border-radius: 28px;
  overflow: hidden;
  touch-action: none;
}
.tots-trace-ghost{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Comic Sans MS', 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(8rem, 22vw, 14rem);
  color: rgba(255, 107, 61, .18);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.tots-trace-canvas{
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  cursor: crosshair;
}
.tots-detail-word{
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  margin: .6rem 0;
  color: #ff6b3d;
  font-weight: 700;
}
.tots-detail-emoji{
  font-size: clamp(4rem, 10vw, 6rem);
  margin: .4rem 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.tots-action-row{
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.tots-big-btn{
  background: #ff6b3d;
  color: #fff;
  border: 0;
  padding: 1rem 1.6rem;
  font-size: 1.2rem;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  min-height: 80px;
  min-width: 180px;
  cursor: pointer;
  box-shadow: 0 6px 0 #c2410c;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tots-big-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #c2410c;
}
.tots-big-btn:active{
  transform: translateY(2px);
  box-shadow: 0 4px 0 #c2410c;
}
.tots-big-btn-ghost{
  background: #fff;
  color: var(--c-ink, #15161c);
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  border: 3px solid #ff6b3d;
}
.tots-big-btn-ghost:hover{ box-shadow: 0 8px 0 rgba(0,0,0,.18); }

/* Story player */
.tots-story{
  background: #fff;
  border-radius: 32px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
  border: 6px solid #34d399;
}
.tots-story-img{
  font-size: clamp(5rem, 14vw, 9rem);
  line-height: 1;
  margin: .5rem 0;
}
.tots-story-text{
  font-size: clamp(1.7rem, 4.4vw, 2.4rem);
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: .005em;
  margin: 1rem 0 1.5rem;
  color: var(--c-ink, #15161c);
}
.tots-story-text .tots-word{
  display: inline-block;
  padding: .12em .25em;
  margin: .12em .04em;
  border-radius: 10px;
}
.tots-story-progress{
  display: flex;
  justify-content: center;
  gap: .35rem;
  margin: .8rem 0;
}
.tots-story-dot{
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(20,15,30,.15);
  transition: background .2s ease;
}
.tots-story-dot.active{ background: #34d399; }

/* Anansi mascot — used in Tots + Chess lessons */
.anansi-mascot{
  display: inline-block;
  width: 60px; height: 60px;
  vertical-align: middle;
  margin-right: .5rem;
}
.anansi-bubble{
  background: #fff;
  border: 3px solid #ff6b3d;
  border-radius: 22px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1rem 0;
  font-size: 1.05rem;
  position: relative;
}
.anansi-bubble::after{
  content: "";
  position: absolute;
  left: 30px;
  bottom: -10px;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #ff6b3d;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .tots-tap-prompt,
  .tots-tile:hover{ animation: none; transform: none; }
}

/* =========================================================
   NSC SUBJECT GUIDES — strip on the grade page
   ========================================================= */
.nsc-strip{
  margin: 1rem 0 1.2rem;
}
.nsc-track-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
}
.nsc-track-card{
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.07);
  border-left: 6px solid var(--accent, #22c55e);
  display: flex;
  flex-direction: column;
}
.nsc-track-card h4{
  margin: .1rem 0 .2rem;
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.15rem;
}
.nsc-track-card p.muted{
  font-size: .8rem;
  margin: 0 0 .7rem;
}
.nsc-track-emoji{ font-size: 2rem; line-height: 1; margin-bottom: .2rem; }
.nsc-track-actions{ display: flex; gap: .4rem; margin-top: auto; flex-wrap: wrap; }

/* =========================================================
   NSC STUDY VIEW — Duolingo-style numbered unit list
   ========================================================= */
.nsc-study{
  background: #fff;
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.nsc-study-head h1{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  margin: .4rem 0 .2rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.nsc-unit-list{
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.nsc-unit{
  background: #faf9f6;
  border-radius: 16px;
  padding: 1rem 1rem 1rem 0;
  display: flex;
  gap: .8rem;
  border-left: 5px solid var(--accent, #22c55e);
}
.nsc-unit-step{
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent, #22c55e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-weight: 800;
  font-size: 1.4rem;
  margin-left: .9rem;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.nsc-unit-body{ flex: 1; min-width: 0; }
.nsc-unit-meta{ display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nsc-unit-meta strong{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.05rem;
}
.nsc-unit-tag{
  background: rgba(0,0,0,.05);
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nsc-unit-points{
  margin: .5rem 0 .3rem;
  padding-left: 1.1rem;
}
.nsc-unit-points li{ margin: .2rem 0; line-height: 1.45; }
.nsc-unit-ict{
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--c-ink, #15161c);
  background: rgba(0,0,0,.03);
  padding: .4rem .6rem;
  border-radius: 8px;
}
.nsc-study-cta{ margin-top: 1.2rem; }

/* =========================================================
   NSC QUIZ VIEW — one-at-a-time MCQ, with progress bar
   ========================================================= */
.nsc-quiz{
  background: #fff;
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  max-width: 720px;
  margin: 0 auto;
}
.nsc-quiz-head{ margin-bottom: 1rem; }
.nsc-quiz-bar{
  height: 10px;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .5rem;
}
.nsc-quiz-bar-fill{
  height: 100%;
  border-radius: 999px;
  transition: width .25s ease;
}
.nsc-quiz-q{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.25rem;
  margin: .4rem 0 .9rem;
}
.nsc-quiz-opts{
  display: grid;
  gap: .6rem;
  margin-bottom: .8rem;
}
.nsc-quiz-opt{
  text-align: left;
  background: #faf9f6;
  border: 2px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: .85rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, border-color .15s ease;
}
.nsc-quiz-opt:hover:not(:disabled){
  transform: translateY(-1px);
  border-color: var(--accent, #22c55e);
}
.nsc-quiz-opt.is-correct{
  background: #ecfdf5;
  border-color: #16a34a;
  color: #14532d;
}
.nsc-quiz-opt.is-wrong{
  background: #fef2f2;
  border-color: #dc2626;
  color: #7f1d1d;
}
.nsc-quiz-opt:disabled{ cursor: default; }
.nsc-quiz-feedback{
  background: #f3f4f6;
  border-left: 5px solid #6b7280;
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: .8rem;
}
.nsc-quiz-feedback.is-good{ background:#ecfdf5; border-left-color:#16a34a; }
.nsc-quiz-feedback.is-bad{  background:#fef2f2; border-left-color:#dc2626; }
.nsc-quiz-foot .btn{ width: 100%; }
.nsc-quiz-result{
  background: #fff;
  border-radius: 22px;
  padding: 2rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.nsc-quiz-result-emoji{ font-size: 4rem; line-height: 1; }
.nsc-quiz-score{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 2rem;
  font-weight: 800;
  margin-top: .3rem;
}

/* =========================================================
   TEACHER LESSON PLANS — index + 5E plan page
   ========================================================= */
.plans-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.plans-grade-card{
  background: #fff;
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 16px rgba(0,0,0,.07);
  border-top: 6px solid var(--accent, #2563eb);
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.plans-grade-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.1);
}
.plans-grade-emoji{ font-size: 2.2rem; line-height: 1; }
.plans-grade-card h3{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  margin: .3rem 0 .1rem;
}
.plans-grade-cta{
  display: inline-block;
  margin-top: .4rem;
  font-weight: 700;
  color: var(--accent, #2563eb);
}
.plan-page{
  background: #fff;
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border-top: 8px solid var(--accent, #2563eb);
}
.plan-head h1{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  margin: .4rem 0 .2rem;
}
.plan-block{
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 1rem;
  margin-top: 1rem;
}
.plan-block h3{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  margin: 0 0 .4rem;
  color: var(--accent, #2563eb);
}
.plan-block ul{ padding-left: 1.2rem; }
.plan-block li{ margin: .3rem 0; line-height: 1.5; }
.plan-phase p{ line-height: 1.6; }
@media print{
  /* Hide all the app chrome — keep only the plan content */
  .no-print{ display: none !important; }
  .topnav, .mobile-bar, .site-foot, .global-back,
  .lc-brain-fab, .dyk-bubble, .lc-install-chip, #offlineBanner,
  .teacher-tools-bar, .admin-banner{ display: none !important; }

  body{ background: #fff !important; color: #000 !important; }
  .app-root{ padding: 0 !important; max-width: none !important; }
  section.section{ padding: 0 !important; max-width: none !important; }

  .plan-page{
    box-shadow: none !important;
    border: 0 !important;
    border-top: 4px solid #000 !important;
    padding: 0 !important;
    background: #fff !important;
    max-width: none !important;
    width: 100% !important;
  }
  .plan-head{ break-inside: avoid; padding-bottom: .4rem; border-bottom: 1px solid #999; margin-bottom: .8rem; }
  .plan-head h1{ font-size: 18pt !important; margin: .3rem 0 !important; color: #000 !important; }
  .plan-head .pill{ background: #000 !important; color: #fff !important; }
  .plan-block{
    break-inside: avoid;
    page-break-inside: avoid;
    border: 0 !important;
    border-top: 1px solid #ccc !important;
    padding-top: .55rem !important;
    margin-top: .55rem !important;
  }
  .plan-block h3{ font-size: 12pt !important; margin: 0 0 .25rem !important; color: #000 !important; }
  .plan-block p, .plan-block li{ font-size: 11pt !important; line-height: 1.45 !important; color: #000 !important; }
  .plan-block ul{ padding-left: 1.1rem !important; margin: .25rem 0 !important; }
  /* Force the alignment block onto a single page */
  .plan-align{ break-before: avoid; page-break-before: avoid; }
}

/* =========================================================
   ECI Colours — tidy grid (each swatch is its own square,
   name sits in a pill BELOW the swatch, never overlapping)
   ========================================================= */
.tots-color-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: .9rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 .5rem;
}
.tots-color-cell{
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  font: inherit;
  outline: none;
}
.tots-color-swatch{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 4px solid transparent;
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tots-color-cell:hover .tots-color-swatch,
.tots-color-cell:focus-visible .tots-color-swatch{
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0,0,0,.18);
}
.tots-color-cell.is-active .tots-color-swatch{
  border-color: #ff6b3d;
  box-shadow: 0 0 0 3px rgba(255,107,61,.35), 0 6px 0 rgba(0,0,0,.18);
}
.tots-color-name{
  font-family: 'Comic Sans MS', 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-ink, #15161c);
  background: #fff;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 2px solid rgba(20,15,30,.1);
  white-space: nowrap;
}

/* =========================================================
   LANDING — two-section picker (ECI vs Primary)
   ========================================================= */
.landing-pick{
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1.4rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
}
.landing-head{
  text-align: center;
  margin-bottom: 1.8rem;
}
.landing-head .kg-eyebrow{ display: inline-flex; }
.landing-h{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 1rem 0 .3rem;
}
.landing-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.landing-card{
  display: block;
  text-decoration: none;
  color: #fff;
  padding: 1.6rem 1.4rem 1.8rem;
  border-radius: 24px;
  box-shadow: 0 16px 40px -10px rgba(20,15,30,.25);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.landing-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -12px rgba(20,15,30,.32);
}
.landing-eci{
  background: linear-gradient(135deg, #ff8a5b 0%, #ec4899 50%, #fda4af 100%);
}
.landing-primary{
  background: linear-gradient(135deg, #6d28d9 0%, #2563eb 60%, #06b6d4 100%);
}
.landing-emoji{
  font-size: 3rem;
  line-height: 1;
}
.landing-eyebrow{
  display: inline-block;
  margin-top: .6rem;
  background: rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.landing-card h2{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.8rem;
  margin: .6rem 0 .4rem;
  color: #fff;
}
.landing-card p{
  margin: 0 0 1rem;
  color: rgba(255,255,255,.92);
  line-height: 1.5;
}
.landing-cta{
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: var(--c-ink, #15161c);
  font-weight: 800;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .95rem;
}
.landing-foot{
  text-align: center;
  margin-top: 2rem;
  color: var(--c-ink-soft, #555);
  font-size: .95rem;
}
.landing-foot a{
  color: var(--c-coral, #ff6b3d);
  font-weight: 700;
  text-decoration: none;
}

/* ECI hero: peach palette (re-uses .kg-hero structure with --eci colour) */
.kg-hero.eci-hero{
  background: linear-gradient(135deg, #ff8a5b 0%, #ec4899 50%, #f472b6 100%);
}
.kg-hero.eci-hero .kg-accent{
  color: #fde68a;
  -webkit-text-fill-color: #fde68a;
}

/* =========================================================
   ECI Stories — tap-to-pronounce per word
   ========================================================= */
.tots-word{
  display: inline-block;
  cursor: pointer;
  padding: 0 .12em;
  border-radius: 6px;
  transition: background .15s ease, transform .12s ease;
}
.tots-word:hover, .tots-word:focus-visible{
  background: rgba(52,211,153,.18);
}
.tots-word.is-said{
  background: #34d399;
  color: #fff;
  transform: translateY(-1px);
}
.tots-story-tap-hint{
  text-align: center;
  font-size: .9rem;
  color: var(--c-ink-soft, #555);
}

/* Teacher grade-scope picker (shown in My Class header) */
.teach-actions{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.teach-scope-label{ font-weight:700; font-size:.9rem; }
.teach-scope-sel{
  font-family: inherit;
  font-weight: 600;
  background: #fff;
  border: 2px solid rgba(20,15,30,.15);
  border-radius: 999px;
  padding: .35rem .8rem;
  font-size: .9rem;
  cursor: pointer;
}
.teach-scope-sel:focus{ outline: 2px solid var(--c-coral, #ff6b3d); outline-offset: 2px; }

/* =========================================================
   LANDING v2 — PlayWell-inspired dark hero + section cards
   ========================================================= */
.lc-land{
  position: relative;
  background: linear-gradient(160deg, #2e1065 0%, #4c1d95 35%, #6d28d9 100%);
  border-radius: 28px;
  margin: 1rem auto;
  max-width: 1200px;
  padding: clamp(1.6rem, 5vw, 3rem) clamp(1rem, 4vw, 2.4rem) 2.4rem;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 22px 60px -20px rgba(20,15,30,.3);
}
.lc-land-doodle{
  position: absolute;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
  pointer-events: none;
  animation: lc-float 6s ease-in-out infinite;
  opacity: .85;
}
.lc-land-doodle.d1 { top: 8%;  left: 4%;  animation-delay: 0s; }
.lc-land-doodle.d2 { top: 20%; right: 8%; animation-delay: 1.2s; }
.lc-land-doodle.d3 { top: 60%; left: 6%;  animation-delay: 2s; }
.lc-land-doodle.d4 { top: 12%; left: 50%; animation-delay: 3s; font-size: 2rem; }
.lc-land-doodle.d5 { bottom: 30%; right: 12%; animation-delay: 1.6s; }
@keyframes lc-float{
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-10px) rotate(8deg); }
}

.lc-land-hero{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
}
@media (max-width: 720px){
  .lc-land-hero{ grid-template-columns: 1fr; gap: 1rem; padding-bottom: 1rem; }
}
.lc-land-eyebrow{
  display: inline-block;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .08em;
  background: rgba(255,255,255,.15);
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.lc-land-title{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1;
  margin: 0 0 1rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.lc-land-blurb{
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255,255,255,.88);
  max-width: 580px;
  margin: 0 0 1.6rem;
}
.lc-land-btn{
  display: inline-block;
  background: linear-gradient(135deg, #ff6b3d 0%, #fb7185 100%);
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  font-size: 1.05rem;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(255,107,61,.6);
  transition: transform .18s ease, box-shadow .18s ease;
}
.lc-land-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(255,107,61,.7);
}

.lc-land-mascots{
  position: relative;
  height: clamp(180px, 28vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.lc-mascot{
  font-size: clamp(3.5rem, 10vw, 6rem);
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.3));
  animation: lc-bob 3s ease-in-out infinite;
}
.lc-mascot-bot      { animation-delay: 0s;   }
.lc-mascot-bookworm { animation-delay: 0.6s; }
.lc-mascot-bee      { animation-delay: 1.2s; }
@keyframes lc-bob{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.lc-land-cards{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.lc-section-card{
  display: block;
  text-decoration: none;
  padding: 1.2rem 1.2rem 1.4rem;
  border-radius: 22px;
  color: #fff;
  position: relative;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lc-section-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -12px rgba(0,0,0,.45);
}
.lc-section-eci    { background: linear-gradient(135deg, #ff8a5b 0%, #ec4899 100%); }
.lc-section-primary{ background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%); }
.lc-section-chess  { background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%); color: #1a1226; }
.lc-section-brain  { background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%); }
.lc-section-emoji  { font-size: 2.2rem; line-height: 1; }
.lc-section-card h3{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.4rem;
  margin: .4rem 0 .3rem;
  color: inherit;
}
.lc-section-card p{
  margin: 0 0 .8rem;
  font-size: .92rem;
  line-height: 1.4;
  opacity: .92;
}
.lc-section-cta{
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: #1a1226;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
}
.lc-land-foot{
  text-align: center;
  margin-top: 1.6rem;
  font-size: .92rem;
  color: rgba(255,255,255,.85);
}
.lc-land-foot a{ color: #fde68a; font-weight: 700; text-decoration: none; }
.lc-land-foot a:hover{ text-decoration: underline; }

@media (prefers-reduced-motion: reduce){
  .lc-land-doodle, .lc-mascot{ animation: none; }
}

/* QR code section at the bottom of the landing */
.lc-land-qr{
  margin-top: 2rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  position: relative;
  z-index: 2;
}
.lc-land-qr-body{
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.lc-land-qr-img{
  background: #fff;
  padding: .5rem;
  border-radius: 12px;
  flex: 0 0 auto;
}
.lc-land-qr-text{
  flex: 1;
  min-width: 220px;
  color: #fff;
}
.lc-land-qr-text strong{
  font-family: var(--f-display, 'Fredoka', sans-serif);
  font-size: 1.2rem;
  display: block;
  margin-bottom: .3rem;
}
.lc-land-qr-text p.muted{
  color: rgba(255,255,255,.85);
  margin: 0 0 .5rem;
  font-size: .92rem;
}
.lc-land-qr-text code{
  display: inline-block;
  background: rgba(0,0,0,.3);
  color: #fde68a;
  padding: .25rem .6rem;
  border-radius: 8px;
  font-size: .85rem;
  word-break: break-all;
}

/* Larger QR + tap-to-open fallback link/button */
.lc-land-qr-link{
  display: inline-block;
  background: rgba(0,0,0,.3);
  color: #fde68a;
  padding: .35rem .75rem;
  border-radius: 8px;
  font-size: .9rem;
  word-break: break-all;
  text-decoration: none;
  margin: .25rem 0 .5rem;
}
.lc-land-qr-link:hover{ background: rgba(0,0,0,.45); text-decoration: underline; }
.lc-land-qr-copy{
  display: inline-block;
  background: #ff6b3d;
  color: #fff;
  border: 0;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  margin-left: .5rem;
}
.lc-land-qr-copy:hover{ background: #f97316; }
.lc-land-qr-img{ image-rendering: pixelated; }

/* =========================================================
   ECI Doodle Pad
   ========================================================= */
.doodle-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  margin: 0 auto 1rem;
  max-width: 920px;
  padding: .7rem 1rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,.07);
}
.doodle-colors{ display:flex; gap:.45rem; flex-wrap:wrap; }
.doodle-swatch{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,.12);
  padding: 0;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.doodle-swatch:hover{ transform: translateY(-2px); }
.doodle-swatch.active{
  border-color: #ff6b3d;
  box-shadow: 0 0 0 3px rgba(255,107,61,.35);
  transform: scale(1.08);
}
.doodle-sizes{ display:flex; gap:.4rem; }
.doodle-size{
  width: 44px; height: 38px;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.12);
  background: #faf9f6;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 800;
}
.doodle-size.active{
  background: #15161c;
  color: #fff;
  border-color: #15161c;
}
.doodle-actions{ margin-left:auto; display:flex; gap:.4rem; }

.doodle-stage{
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.doodle-canvas{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

/* Tile colour for the new Doodle Pad ECI tile (matches existing tots-* style) */
.tots-tile.tots-doodle{
  background: linear-gradient(135deg, #fda4af 0%, #f0abfc 100%);
}

/* =========================================================
   VISUAL CLEANUP PASS — additive, no class renames
   Goals:
     1. Consistent keyboard focus rings (a11y)
     2. Touch-target minimums on every interactive element (mobile)
     3. Honour prefers-reduced-motion
     4. Smoother default hover/transition timings
     5. Card-shadow + radius unification using existing tokens
   ========================================================= */

/* 1) Focus-visible — clean coral ring on keyboard nav, never on mouse click */
:root{ --focus-ring: 0 0 0 3px rgba(255,107,61,.45); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible,
.tots-tile:focus-visible,
.tots-cell:focus-visible,
.tots-color-cell:focus-visible,
.tots-big-btn:focus-visible,
.lc-section-card:focus-visible,
.landing-card:focus-visible,
.play-card:focus-visible,
.plans-grade-card:focus-visible,
.nsc-track-card:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring), 0 6px 16px rgba(0,0,0,.08);
}

/* 2) Touch targets — every button/link reaches at least 44×44 px on mobile.
   Excluded: colour swatches and brush sizers (intentionally compact). */
.btn,
.btn-tiny,
.tots-big-btn,
.lc-land-btn,
.lc-section-cta,
.lc-land-qr-copy,
.kg-btn,
.tots-cell,
.tots-color-cell,
.tab,
.dyk-fab,
.lc-brain-fab,
.lc-install-chip{
  min-height: var(--tap-min-h);
}
.btn,
.btn-tiny,
.tots-big-btn,
.lc-land-btn,
.kg-btn{
  min-width: var(--tap-min-h);
}
/* Doodle palette stays compact — kids tap, not press */
.doodle-swatch,
.doodle-size{ min-height: 38px; }

/* 3) Reduced motion — respect the OS setting (kids with vestibular issues, low-end Android) */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 4) Smoother default transition on the most-touched elements (cards + buttons).
   Many existing rules already declare specific transitions; this is the fallback. */
.btn,
.btn-tiny,
.tots-big-btn,
.lc-land-btn,
.lc-section-card,
.landing-card,
.plans-grade-card,
.nsc-track-card,
.tots-tile,
.play-card,
.cs-card{
  transition-property: transform, box-shadow, background-color, border-color, color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(.2,.8,.25,1);
}

/* 5) Image defaults — prevent the layout-shift you see on slow rural connections */
img{ max-width: 100%; height: auto; }

/* 6) Selection colour — coral, on-brand */
::selection{ background: rgba(255,107,61,.28); color: var(--c-ink, #15131c); }

/* 7) Body min-height + safe-area on phones with notches */
html, body{ min-height: 100%; }
body{
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 8) Form controls — kid-friendly defaults that don't override existing forms */
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea{
  min-height: 40px;
  font-family: inherit;
}

/* 9) Heading rhythm helper class — opt-in, doesn't break anything */
.lc-h1{ font-family: var(--f-display); font-size: var(--text-h1); line-height: 1.1; }
.lc-h2{ font-family: var(--f-display); font-size: var(--text-h2); line-height: 1.15; }
.lc-h3{ font-family: var(--f-display); font-size: var(--text-xl); line-height: 1.2; }

/* 10) Card-shadow consistency — when a card has no explicit shadow, fall back to var */
.plans-grade-card,
.nsc-track-card,
.landing-card,
.lc-section-card{
  border-radius: var(--r-md);
}

/* ECI Numbers — make a row of 11–20 emojis wrap nicely */
.tots-detail-emoji{
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

/* Shapes section */
.tots-tile.tots-shapes{
  background: linear-gradient(135deg, #c084fc 0%, #818cf8 100%);
}
.tots-shapes-things{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .6rem;
  max-width: 480px;
  margin: 0 auto 1rem;
}
.tots-shapes-thing{
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 2px solid rgba(139,92,246,.25);
  border-radius: 14px;
  padding: .5rem .75rem;
  font-weight: 600;
}
.tots-shapes-thing-emoji{ font-size: 1.6rem; line-height: 1; }

/* ECI Sight Words */
.tots-tile.tots-sight{
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
}

/* ECI Days / Months / Seasons */
.tots-tile.tots-days{
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.tots-tile.tots-months{
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.tots-tile.tots-seasons{
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.tots-tile.tots-body{
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}
.tots-tile.tots-about{
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}
.tots-tile.tots-games{
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}
.tots-tile.tots-spanish{
  background: linear-gradient(135deg, #dc2626 0%, #FFD100 100%);
}

/* =========================================================
   ECI — Basic Spanish (¡Hola!) tile grid + bilingual cards
   Distinct from sight-words by showing TWO words per tile
   (Spanish on top in bold red, English below in ink-soft).
   ========================================================= */
.eci-es-tabs{ margin-bottom: 1.2rem; }
.eci-es-card{ background: linear-gradient(180deg, #fff7ed 0%, #fff 70%); }
.eci-es-en{
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 3.2vw, 1.6rem);
  color: #6b1e1e;
  margin: .2rem 0 0;
  letter-spacing: .01em;
  opacity: .85;
}
.eci-es-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .7rem;
  margin-top: 1rem;
}
.eci-es-cell{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding: .9rem .6rem;
  border-radius: 14px;
  border: 2px solid rgba(220, 38, 38, .25);
  background: #fff;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
  font-family: var(--f-display);
  min-height: 110px;
}
.eci-es-cell:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -8px rgba(220, 38, 38, .45);
  border-color: rgba(220, 38, 38, .55);
}
.eci-es-cell.active{
  border-color: #dc2626;
  background: linear-gradient(180deg, #fff1f2 0%, #fff 70%);
  box-shadow: 0 8px 20px -10px rgba(220, 38, 38, .65);
}
.eci-es-cell-emoji{
  font-size: 2rem;
  line-height: 1;
  margin-bottom: .15rem;
}
.eci-es-cell-es{
  font-weight: 800;
  font-size: 1rem;
  color: #dc2626;
  letter-spacing: .01em;
}
.eci-es-cell-en{
  font-weight: 600;
  font-size: .76rem;
  color: var(--c-ink-soft, #475569);
  text-transform: uppercase;
  letter-spacing: .04em;
}
@media (max-width: 540px){
  .eci-es-grid{ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; }
  .eci-es-cell{ min-height: 96px; padding: .7rem .4rem; }
  .eci-es-cell-emoji{ font-size: 1.6rem; }
  .eci-es-cell-es{ font-size: .92rem; }
  .eci-es-cell-en{ font-size: .68rem; }
}

/* =========================================================
   ECI — Tots Games Library
   ========================================================= */
.eg-hub{ max-width: 920px; margin: 0 auto; }
.eg-back{
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #fff;
  color: #4b1e82;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  border: 2px solid rgba(75, 30, 130, .14);
  margin-bottom: .8rem;
}
.eg-head{ text-align: center; margin-bottom: 1.4rem; }
.eg-eyebrow{
  font-family: var(--f-display, system-ui);
  font-size: .76rem;
  letter-spacing: .14em;
  color: #047857;
  text-transform: uppercase;
}
.eg-title{
  font-family: var(--f-display, system-ui);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: .3rem 0 .35rem;
  color: #1f0f3a;
}
.eg-blurb{
  margin: 0 auto;
  max-width: 540px;
  color: #4b3a6b;
  font-size: 1rem;
  line-height: 1.5;
}

.eg-cat{ margin-bottom: 1.6rem; }
.eg-cat-h{
  font-family: var(--f-display, system-ui);
  font-size: 1.2rem;
  margin: 0 0 .25rem;
  color: #1f0f3a;
}
.eg-cat-blurb{
  margin: 0 0 .6rem;
  color: #4b3a6b;
  font-size: .9rem;
  line-height: 1.45;
}

.eg-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .55rem;
}
.eg-card{
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1rem .8rem;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: #1f0f3a;
  border: 2px solid rgba(31, 15, 58, .08);
  box-shadow: 0 4px 12px -10px rgba(31, 15, 58, .35);
  transition: transform .12s ease;
}
.eg-card:hover{ transform: translateY(-3px); color: #1f0f3a; }
.eg-card.is-live{ border-left: 4px solid #10b981; }
.eg-card.is-soon{ border-left: 4px solid rgba(31, 15, 58, .12); opacity: .82; }
.eg-card-emoji{ font-size: 1.8rem; line-height: 1; }
.eg-card-title{ font-family: var(--f-display, system-ui); font-size: 1rem; }
.eg-card-blurb{ font-size: .82rem; color: #4b3a6b; line-height: 1.4; }
.eg-card-cta{
  margin-top: .35rem;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.eg-card.is-live .eg-card-cta{ color: #047857; }
.eg-card.is-soon .eg-card-cta{ color: #6b5b8a; }

.eg-foot{
  margin: 2rem 0 1rem;
  text-align: center;
  font-size: .88rem;
}

/* Coming-soon page */
.eg-soon{ max-width: 520px; margin: 0 auto; }
.eg-soon-card{
  background: linear-gradient(180deg, #fef3c7 0%, #fff 60%);
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 22px;
  padding: 2rem 1.4rem 1.4rem;
  text-align: center;
}
.eg-soon-emoji{ font-size: 4rem; line-height: 1; }
.eg-soon-eyebrow{
  font-family: var(--f-display, system-ui);
  font-size: .76rem;
  letter-spacing: .14em;
  color: #b45309;
  text-transform: uppercase;
}
.eg-soon-card h1{
  font-family: var(--f-display, system-ui);
  font-size: 1.8rem;
  margin: .3rem 0 .35rem;
}
.eg-soon-pill{
  display: inline-block;
  background: #fbbf24;
  color: #4b1e82;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
  font-size: .82rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-top: .8rem;
}

/* Working game shell */
.eg-play{ max-width: 720px; margin: 0 auto; }
.eg-play-head{ text-align: center; margin: 1rem 0; }
.eg-play-emoji{ font-size: 3rem; line-height: 1; }
.eg-play-head h1{
  font-family: var(--f-display, system-ui);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: .3rem 0 .25rem;
}
.eg-play-sub{
  margin: 0;
  color: #4b3a6b;
}
.eg-play-body{
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 60%);
  border-radius: 22px;
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(16, 185, 129, .25);
  text-align: center;
}
.eg-instr{
  font-family: var(--f-display, system-ui);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  margin: 0 0 1rem;
  color: #1f0f3a;
}
.eg-progress-line{
  margin-top: 1rem;
  font-size: .85rem;
  color: #6b5b8a;
}
.eg-options{
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: center;
  margin-top: .6rem;
}
.eg-options-stack{ flex-direction: column; align-items: stretch; max-width: 380px; margin: 0 auto; }
.eg-options-yn{ gap: 1rem; }
.eg-opt{
  background: #fff;
  border: 3px solid rgba(31, 15, 58, .12);
  border-radius: 16px;
  padding: 1rem 1.4rem;
  font-size: 1.8rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(31, 15, 58, .12);
  transition: transform .12s ease;
  min-width: 64px;
}
.eg-opt:hover{ transform: translateY(-2px); }
.eg-opt-text{ font-size: 1.1rem; font-family: var(--f-display, system-ui); font-weight: 700; padding: .9rem 1rem; }
.eg-opt-yes{ background: #dcfce7; border-color: #10b981; }
.eg-opt-no { background: #fee2e2; border-color: #ef4444; }
.eg-opt.is-right{ background: #10b981; color: #fff; border-color: #047857; box-shadow: 0 5px 0 #047857; }
.eg-opt.is-wrong{ background: #fecaca; border-color: #b91c1c; }

/* Web Weaver */
.eg-pattern{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  margin: 1rem 0 .8rem;
}
.eg-bead{
  font-size: 2.4rem;
  line-height: 1;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.7);
  border-radius: 50%;
  border: 2px solid rgba(31, 15, 58, .08);
}
.eg-bead.is-q{
  background: #fef3c7;
  border-style: dashed;
  border-color: #f59e0b;
  color: #b45309;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
}

/* Count the Patties */
.eg-patties{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
  margin: 1rem 0;
}
.eg-patty{
  font-size: 2.6rem;
  width: 76px; height: 76px;
  border: none;
  border-radius: 16px;
  background: #fff7e6;
  cursor: pointer;
  box-shadow: 0 5px 0 #b45309;
  transition: transform .1s ease;
}
.eg-patty:hover{ transform: translateY(-2px); }
.eg-patty.is-counted{ background: #34d399; box-shadow: 0 3px 0 #047857; opacity: .9; }

/* More or Less Mangoes */
.eg-baskets{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin: 1rem 0;
}
.eg-basket{
  background: #fff;
  border: 3px solid rgba(31, 15, 58, .1);
  border-radius: 18px;
  padding: 1rem .6rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  align-items: center;
  box-shadow: 0 5px 0 rgba(31, 15, 58, .12);
}
.eg-basket-fruits{
  font-size: 1.3rem;
  line-height: 1.3;
  word-break: break-all;
}
.eg-basket-label{
  font-family: var(--f-display, system-ui);
  font-size: 1.4rem;
  font-weight: 800;
  color: #1f0f3a;
}
.eg-basket.is-right{ background: #dcfce7; border-color: #10b981; }
.eg-basket.is-wrong{ background: #fecaca; border-color: #b91c1c; }

/* What's Missing */
.eg-row{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
  margin: 1rem 0;
}
.eg-tile{
  font-size: 2.4rem;
  line-height: 1;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: #fff;
  border-radius: 14px;
  border: 2px solid rgba(31, 15, 58, .08);
}
.eg-tile.eg-tile-q{
  background: #fef3c7;
  border-style: dashed;
  border-color: #f59e0b;
  color: #b45309;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
}
.eg-row-show .eg-tile{ animation: egTileFadeIn .25s ease both; }
@keyframes egTileFadeIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Win screen */
.eg-win{ padding: 1rem; }
.eg-win-emoji{ font-size: 4rem; line-height: 1; margin-bottom: .35rem; }
.eg-win h2{
  font-family: var(--f-display, system-ui);
  font-size: 1.5rem;
  margin: .3rem 0 .8rem;
  color: #1f0f3a;
}

/* =========================================================
   NEW Tots Games — shared visuals (egMultiChoice + egSequenceTap
   + game-specific bits used by the 26 v125 games)
   ========================================================= */
.eg-instr{
  font-size: 1.1rem;
  text-align: center;
  margin: 1rem 0 .6rem;
  color: #1f0f3a;
  font-family: var(--f-display, system-ui);
  font-weight: 700;
}
.eg-instr strong{ color: #4c1d95; }
.eg-visual{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem;
  font-size: 2rem; margin: .4rem 0;
}
.eg-options-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .55rem;
  max-width: 540px;
  margin: 0 auto 1rem;
}
.eg-opt-tile{
  background: #fff;
  border: 3px solid rgba(31,15,58,.12);
  border-radius: 16px;
  padding: 1rem .6rem;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: center;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.eg-opt-tile:hover{ transform: translateY(-2px); box-shadow: 0 6px 14px -8px rgba(31,15,58,.35); }
.eg-opt-emoji{ font-size: 2rem; line-height: 1; }
.eg-opt-label{ font-size: .9rem; color: #1f0f3a; }
.eg-opt.is-right{ background: #d1fae5; border-color: #047857; }
.eg-opt.is-wrong{ background: #fee2e2; border-color: #b91c1c; animation: egShake .4s ease 1; }
@keyframes egShake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-6px);} 75%{transform:translateX(6px);} }

.eg-seq-progress{
  display: flex; gap: .35rem; justify-content: center; margin: .35rem 0 .8rem;
}
.eg-seq-dot{
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(31,15,58,.15);
  transition: background .2s ease;
}
.eg-seq-dot.is-done{ background: #16a34a; }

/* Loops — loop stage with empty slots + repeat buttons */
.eg-loop-stage{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem;
  font-size: 2rem; margin: .8rem 0;
  min-height: 3rem;
}
.eg-loop-slot{
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 2px dashed rgba(31,15,58,.2);
  border-radius: 10px;
  color: rgba(31,15,58,.25);
}
.eg-loop-slot.is-filled{
  background: #ecfdf5;
  border-style: solid;
  border-color: #10b981;
  color: inherit;
  animation: egPop .3s ease 1;
}
@keyframes egPop { 0%{transform:scale(.6);} 100%{transform:scale(1);} }
.eg-loop-buttons{ display: flex; justify-content: center; gap: .55rem; flex-wrap: wrap; }

/* Doctor Bird flowers */
.eg-flowers{
  display: flex; gap: .8rem; justify-content: center; margin: 1rem 0;
  perspective: 800px;
}
.eg-flower{
  width: 72px; height: 72px;
  font-size: 2.4rem;
  border: 3px solid rgba(31,15,58,.15);
  border-radius: 18px;
  background: #fff7ed;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .25s ease;
}
.eg-flower.is-show{ background: #fef3c7; border-color: #f59e0b; }
.eg-flower.is-right{ background: #d1fae5; border-color: #047857; }
.eg-flower.is-wrong{ background: #fee2e2; border-color: #b91c1c; }
.eg-flowers.is-shuffle{ animation: egShuffle .2s ease 1; }
@keyframes egShuffle {
  0%,100% { transform: translateX(0); }
  50%     { transform: translateX(8px) rotate(1deg); }
}

/* Ackee Match — memory cards */
.eg-match-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  max-width: 360px;
  margin: 1rem auto;
}
.eg-match-card{
  aspect-ratio: 1;
  border-radius: 14px;
  border: 3px solid rgba(31,15,58,.18);
  background: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, background .2s ease;
}
.eg-match-card .eg-match-back{ display: block; }
.eg-match-card .eg-match-face{ display: none; }
.eg-match-card.is-up{ background: #fef3c7; border-color: #f59e0b; transform: rotateY(0); }
.eg-match-card.is-up .eg-match-back{ display: none; }
.eg-match-card.is-up .eg-match-face{ display: block; }
.eg-match-card.is-matched{ background: #d1fae5; border-color: #047857; }

/* Design Tam */
.eg-tam-preview{ display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1rem 0; min-height: 100px; }
.eg-tam{
  position: relative;
  width: 180px; height: 90px;
  border-top-left-radius: 90px;
  border-top-right-radius: 90px;
  overflow: hidden;
  box-shadow: 0 8px 18px -10px rgba(31,15,58,.4);
}
.eg-tam-stripe{ height: 33%; }
.eg-tam-pom{
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  color: #fbbf24;
}
.eg-palette{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem;
}
.eg-swatch{
  width: 48px; height: 48px;
  font-size: 1.8rem;
  border-radius: 50%;
  border: 3px solid rgba(31,15,58,.15);
  background: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s ease;
}
.eg-swatch:hover{ transform: scale(1.1); }
.eg-swatch.is-chosen{ box-shadow: 0 0 0 3px #fbbf24; }

/* Storyteller */
.eg-story{ max-width: 560px; margin: 0 auto; text-align: center; padding: 1rem; }
.eg-story-cover{ font-size: 3rem; margin: 0 0 .4rem; }
.eg-story-body{
  background: #fef9c3;
  border: 2px dashed #facc15;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #422006;
  margin: 0 0 1rem;
}

/* Colour the Flag */
.eg-flag{ display: flex; justify-content: center; margin: 1rem 0; }
.eg-flag-svg{
  width: 260px; height: auto;
  border: 4px solid #1f0f3a;
  border-radius: 8px;
  box-shadow: 0 10px 22px -10px rgba(31,15,58,.45);
}
.eg-flag-svg polygon{ cursor: pointer; transition: opacity .15s ease; }
.eg-flag-svg polygon:hover{ opacity: .8; }

/* Trace the Letter */
.eg-trace-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .4rem;
  max-width: 320px;
  margin: 1rem auto;
}
.eg-trace-cell{ aspect-ratio: 1; }
.eg-trace-dot{
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(31,15,58,.15);
  background: rgba(31,15,58,.04);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .12s ease;
}
.eg-trace-dot.is-start{ background: #fef3c7; border-color: #f59e0b; }
.eg-trace-dot.is-done{ background: #16a34a; border-color: #047857; }
.eg-trace-dot.is-wrong{ background: #fee2e2; border-color: #b91c1c; animation: egShake .4s ease 1; }

/* Tie the Boat — peg sequence */
.eg-pegs{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem;
  margin: 1rem 0;
}
.eg-peg{
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 3px solid #92400e;
  background: #fef3c7;
  font-size: 1.6rem;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
  color: #78350f;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s ease, background .15s ease;
}
.eg-peg:hover{ transform: scale(1.08); }
.eg-peg.is-done{ background: #16a34a; border-color: #047857; color: #fff; }
.eg-peg.is-wrong{ background: #fee2e2; border-color: #b91c1c; animation: egShake .4s ease 1; }

/* Catch the Ackee — falling-item stage */
.eg-catch-stage{
  position: relative;
  height: 60vh; max-height: 480px;
  min-height: 320px;
  margin: .8rem 0;
  background: linear-gradient(180deg, #e0f2fe 0%, #ecfdf5 100%);
  border: 3px solid #14b8a6;
  border-radius: 16px;
  overflow: hidden;
}
.eg-catch-item{
  position: absolute;
  width: 56px; height: 56px;
  font-size: 2.4rem;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s ease, opacity .15s ease;
}
.eg-catch-item.is-gone{ transform: scale(1.4); opacity: 0; }

/* Fix Anansi's Web — tap to fill gaps */
.eg-web-row{
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem;
  margin: 1rem 0;
}
.eg-web-tile{
  width: 60px; height: 60px;
  border-radius: 14px;
  border: 3px solid rgba(31,15,58,.15);
  background: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s ease, background .15s ease;
}
.eg-web-tile.is-gap{
  background: #fef3c7;
  border-style: dashed;
  border-color: #f59e0b;
  color: #b45309;
  font-family: var(--f-display, system-ui);
  font-weight: 800;
}
.eg-web-tile.is-on{ background: #ede9fe; border-color: #7c3aed; }
.eg-web-tile:hover:not([disabled]){ transform: scale(1.08); }

/* =========================================================
   ECI — All About Me
   ========================================================= */
.eci-about{ max-width: 720px; margin: 0 auto; }
.ea-head{ text-align: center; margin-bottom: 1rem; position: relative; }
.ea-back{
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: #fff;
  color: #4b1e82;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 800;
  border: 2px solid rgba(75, 30, 130, .14);
}
.ea-eyebrow{
  font-family: var(--f-display);
  font-size: .76rem;
  letter-spacing: .14em;
  color: #b45309;
  text-transform: uppercase;
}
.ea-title{
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: .3rem 0 .35rem;
  color: #1f0f3a;
}
.ea-blurb{
  margin: 0 auto;
  max-width: 480px;
  color: #4b3a6b;
  font-size: 1rem;
  line-height: 1.5;
}

.ea-progress{
  list-style: none;
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin: 1.2rem 0;
  padding: 0;
  flex-wrap: wrap;
}
.ea-step{
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(31, 15, 58, .08);
  font-family: var(--f-display);
  font-weight: 800;
  color: #4b3a6b;
  cursor: pointer;
  transition: transform .12s ease;
}
.ea-step:hover{ transform: translateY(-2px); }
.ea-step.is-done{ background: #34d399; color: #fff; }
.ea-step.is-active{
  background: #f59e0b; color: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .25);
}

.ea-card{
  background: linear-gradient(180deg, #fef3c7 0%, #fff 60%);
  border-radius: 22px;
  padding: 1.6rem 1.4rem 1.2rem;
  border: 1px solid rgba(245, 158, 11, .25);
  text-align: center;
}
.ea-prompt{
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0 0 1.2rem;
  color: #1f0f3a;
}
.ea-options{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .55rem;
  margin: 0 auto 1rem;
  max-width: 560px;
}
.ea-opt{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .9rem .55rem;
  border-radius: 16px;
  border: 3px solid #fff;
  background: #fff;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 4px 0 rgba(31, 15, 58, .1);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ea-opt:hover{ transform: translateY(-3px); }
.ea-opt.is-picked{
  border-color: #f59e0b;
  background: #fff7e6;
  box-shadow: 0 5px 0 #b45309;
}
.ea-opt-emoji{ font-size: 2rem; line-height: 1; }
.ea-opt-label{
  font-family: var(--f-display);
  font-size: .95rem;
  font-weight: 800;
  color: #1f0f3a;
}

#eaNameInput{
  width: 100%;
  max-width: 360px;
  padding: .8rem 1rem;
  font-size: 1.4rem;
  font-family: var(--f-display);
  text-align: center;
  border-radius: 14px;
  border: 2px solid rgba(31, 15, 58, .15);
  background: #fff;
  margin: 0 auto .7rem;
  display: block;
}
.ea-pick-btn{
  background: #f59e0b;
  color: #fff;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1rem;
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 #b45309;
}
.ea-step-foot, .ea-summary-actions{
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.ea-skip{
  background: transparent;
  border: 2px solid rgba(31, 15, 58, .12);
  border-radius: 999px;
  padding: .45rem 1rem;
  cursor: pointer;
  font-weight: 700;
  color: #4b3a6b;
}
.ea-skip:hover{ background: rgba(31, 15, 58, .04); }

.ea-summary{
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 60%);
  border: 1px solid rgba(0, 155, 58, .25);
  border-radius: 22px;
  padding: 1.6rem 1.4rem 1.2rem;
  text-align: center;
}
.ea-summary-head{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  text-align: left;
  margin-bottom: 1rem;
}
.ea-summary-emoji{
  font-size: 3rem;
  line-height: 1;
  width: 80px; height: 80px;
  display: grid; place-items: center;
  background: #fff;
  border-radius: 50%;
  border: 4px solid #34d399;
}
.ea-summary-eyebrow{
  font-family: var(--f-display);
  font-size: .76rem;
  letter-spacing: .14em;
  color: #047857;
  text-transform: uppercase;
}
.ea-summary-head h2{
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin: .2rem 0 0;
  color: #1f0f3a;
}
.ea-summary-list{
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  text-align: center;
  display: grid;
  gap: .35rem;
}
.ea-summary-list li{
  background: #fff;
  border-radius: 12px;
  padding: .65rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f0f3a;
  border: 1px solid rgba(0, 155, 58, .15);
}
.tots-tile.tots-chess{
  background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
  color: #fbbf24;
}

/* =========================================================
   ECI — CHESS FOR TOTS
   Hub: chess board on the left, activity menu on the right
   ========================================================= */
.eci-chess-page{ max-width: 1100px; margin: 0 auto; }
.eci-chess-grid{
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 380px);
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 720px){
  .eci-chess-grid{ grid-template-columns: 1fr; }
}

.eci-chess-board{
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border-radius: 14px;
  overflow: hidden;
  border: 4px solid #1f2937;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.45);
  aspect-ratio: 1;
  width: 100%;
}
.eci-chess-board.eci-chess-board-play{
  grid-template-columns: repeat(6, 1fr);
}
.eci-cb-sq{
  display: grid; place-items: center;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  line-height: 1;
  color: #1f2937;
  user-select: none;
  position: relative;
}
.eci-cb-sq.lt{ background: #eeeed2; }
.eci-cb-sq.dk{ background: #769656; }

/* Play-mode tweaks */
.eci-chess-board-play .eci-cb-sq{
  cursor: pointer;
  transition: transform .12s ease;
}
.eci-chess-board-play .eci-cb-sq:hover{ transform: scale(1.04); }
.eci-cb-sq.is-move{
  box-shadow: inset 0 0 0 4px rgba(34, 197, 94, .85);
}
.eci-cb-sq.is-move::after{
  content: '';
  position: absolute;
  width: 22%; height: 22%;
  border-radius: 50%;
  background: rgba(34, 197, 94, .7);
}
.eci-cb-piece{
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1;
  color: #1f0f3a;
  transition: transform .15s ease;
}
.eci-cb-piece.is-selected{
  transform: scale(1.18) translateY(-3px);
  filter: drop-shadow(0 4px 6px rgba(245, 158, 11, .65));
}
.eci-cb-mango{
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1;
  animation: bcMangoBob 1.4s ease-in-out infinite;
}
@keyframes bcMangoBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-4px) rotate(4deg); }
}

/* Activity menu on the right of the hub */
.eci-chess-menu{
  background: #1f2937;
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 6px 20px -10px rgba(0,0,0,.35);
}
/* When the activity menu sits BELOW the play area on the chess hub,
   spread the cards horizontally instead of stacking them. */
.eci-chess-menu.eci-chess-menu-bottom{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .55rem;
}
.eci-chess-menu.eci-chess-menu-bottom .eci-chess-card{
  margin-bottom: 0;
}
.eci-chess-menu-head{
  display: flex; align-items: center; gap: .55rem;
  color: #fbbf24;
  font-family: var(--f-display, system-ui, sans-serif);
  font-size: 1.1rem;
  margin: 0 0 .8rem;
}
.eci-chess-menu-emoji{ font-size: 1.6rem; }
.eci-chess-card{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  margin-bottom: .55rem;
  border: 1px solid rgba(251, 191, 36, .12);
  transition: transform .12s ease, background .12s ease;
}
.eci-chess-card:hover:not(.eci-chess-card-soon){
  transform: translateX(4px);
  background: #111827;
  color: #fff;
}
.eci-chess-card-soon{ opacity: .65; cursor: not-allowed; }
.eci-chess-card-icon{
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(251, 191, 36, .15);
  border-radius: 10px;
  font-size: 1.4rem;
}
.eci-chess-card-body{ display: flex; flex-direction: column; line-height: 1.25; }
.eci-chess-card-body strong{ font-weight: 800; font-size: 1rem; color: #fbbf24; }
.eci-chess-card-body span{ font-size: .82rem; color: rgba(255,255,255,.75); margin-top: .1rem; }
.eci-chess-soon-pill{
  font-size: .68rem; font-weight: 800;
  background: rgba(251, 191, 36, .2);
  color: #fbbf24;
  padding: .15rem .5rem;
  border-radius: 999px;
}

/* Baby Chess play page */
.eci-chess-play{ max-width: 720px; margin: 0 auto; }
.bc-status{
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .6rem;
  margin-bottom: .6rem;
  background: #fef3c7;
  border-radius: 12px;
  padding: .6rem .9rem;
  border: 1px solid rgba(245, 158, 11, .25);
}
.bc-score{
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--f-display, system-ui, sans-serif);
  font-size: 1.05rem;
  color: #4b1e82;
}
.bc-level-badge{
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-family: var(--f-display, system-ui, sans-serif);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.bc-level-progress{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .4rem;
  padding-top: .4rem;
  border-top: 1px dashed rgba(245, 158, 11, .35);
  font-size: .82rem;
  color: #1f0f3a;
}
.bc-level-progress.bc-level-max span:first-child{ color: #4b1e82; font-weight: 800; }
.bc-fruit-set{ font-size: 1rem; letter-spacing: .12em; }
.bc-instr{ color: #1f0f3a; font-size: .92rem; }
.bc-piece-row{
  display: flex; flex-wrap: wrap; gap: .55rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.bc-piece-label{
  font-family: var(--f-display, system-ui, sans-serif);
  font-size: .9rem;
  color: #4b1e82;
  margin-right: .3rem;
}
.bc-piece-btn{
  display: flex; flex-direction: column; align-items: center;
  gap: .15rem;
  background: #fff;
  border: 2px solid rgba(75, 30, 130, .15);
  border-radius: 12px;
  padding: .55rem .8rem;
  cursor: pointer;
  font: inherit;
  min-width: 70px;
  transition: transform .12s ease, border-color .12s ease;
}
.bc-piece-btn:hover{ transform: translateY(-2px); }
.bc-piece-btn.active{
  border-color: #f59e0b;
  background: #fef3c7;
  box-shadow: 0 4px 0 #b45309;
}
.bc-piece-glyph{ font-size: 1.8rem; line-height: 1; color: #1f0f3a; }
.bc-piece-name{ font-size: .76rem; font-weight: 800; color: #1f0f3a; }

/* Spelling letter tiles on the Body Parts flash-cards */
.tots-spell-row{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 .4rem;
}
.tots-spell-letter{
  font-family: var(--f-display, 'Fredoka One', system-ui, sans-serif);
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  background: #ec4899;
  border: none;
  border-radius: 14px;
  width: clamp(48px, 11vw, 70px);
  height: clamp(58px, 13vw, 82px);
  box-shadow: 0 5px 0 rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tots-spell-letter:hover{
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0,0,0,.18);
}
.tots-spell-letter:active{
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.tots-spell-letter.is-said{
  background: #fbbf24 !important;
  color: #4b1e82;
  transform: translateY(-3px) scale(1.06);
}
.tots-sight-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: 0 auto 1rem;
  max-width: 600px;
}
.tots-sight-tab{
  background: #fff;
  border: 2px solid rgba(14,165,233,.25);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  color: var(--c-ink, #15131c);
}
.tots-sight-tab:hover{ background: rgba(14,165,233,.08); }
.tots-sight-tab.active{
  background: #0ea5e9;
  color: #fff;
  border-color: #0369a1;
  box-shadow: 0 4px 0 #0369a1;
}
.tots-sight-count{ font-size: .8em; opacity: .8; }
.tots-sight-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 920px;
  margin: 0 auto;
  padding: .25rem; /* leaves room for the lift-on-hover */
}
.tots-sight-word{
  background: #fffbe6;
  border: 4px solid #fbbf24;
  border-radius: 24px;
  padding: 1.2rem .6rem;
  font: inherit;
  font-family: 'Comic Sans MS', var(--f-display, 'Fredoka', sans-serif);
  font-weight: 800;
  font-size: 2.2rem;
  cursor: pointer;
  color: var(--c-ink, #15131c);
  box-shadow: 0 6px 0 rgba(20,15,30,.18);
  transition: transform .18s cubic-bezier(.2,.9,.3,1.4),
              box-shadow .18s ease,
              background .15s ease;
  text-shadow: 1px 2px 0 rgba(255,255,255,.8);
}
/* Rotating pastel palette so the wall feels like a sticker book */
.tots-sight-word:nth-child(7n+1){ background:#fef3c7; border-color:#fbbf24; transform: rotate(-1.5deg); }
.tots-sight-word:nth-child(7n+2){ background:#dbeafe; border-color:#60a5fa; transform: rotate(1deg); }
.tots-sight-word:nth-child(7n+3){ background:#dcfce7; border-color:#34d399; transform: rotate(-0.5deg); }
.tots-sight-word:nth-child(7n+4){ background:#fce7f3; border-color:#ec4899; transform: rotate(2deg); }
.tots-sight-word:nth-child(7n+5){ background:#ede9fe; border-color:#8b5cf6; transform: rotate(-1deg); }
.tots-sight-word:nth-child(7n+6){ background:#ffedd5; border-color:#fb923c; transform: rotate(1.5deg); }
.tots-sight-word:nth-child(7n+7){ background:#cffafe; border-color:#06b6d4; transform: rotate(-2deg); }

.tots-sight-word:hover,
.tots-sight-word:focus-visible{
  transform: translateY(-4px) rotate(0deg) scale(1.04);
  box-shadow: 0 12px 0 rgba(20,15,30,.18);
}
.tots-sight-word.is-said{
  background: #ff6b3d !important;
  color: #fff !important;
  border-color: #c2410c !important;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
  transform: scale(1.15) rotate(0deg) !important;
  box-shadow: 0 4px 0 #c2410c !important;
}
@media (prefers-reduced-motion: reduce){
  .tots-sight-word:nth-child(n){ transform: none; }
  .tots-sight-word:hover{ transform: translateY(-3px); }
}

/* Weekly-rotation indicator on NSC quiz */
.nsc-quiz-week{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,107,61,.12);
  color: #c2410c;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  margin: .35rem 0 .5rem;
  cursor: help;
}
