.ct-visual{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;padding:8px;min-height:65px;max-width:100%}.ct-visual .ct-visual{padding:0;min-height:0}.ct-shape{display:inline-block;flex-shrink:0;width:var(--sz);height:var(--sz);background:var(--ink);color:var(--ink);font-size:var(--sz);line-height:1;text-align:center}.ct-shape.circle{border-radius:50%}.ct-shape.triangle{clip-path:polygon(50% 0,100% 100%,0 100%)}.ct-shape.rectangle{width:calc(var(--sz)*1.5);height:calc(var(--sz)*.7)}.ct-shape.line{width:var(--sz);height:13px;border-radius:6px}.ct-shape.star,.ct-shape.moon,.ct-shape.heart,.ct-shape.sock,.ct-shape.cup,.ct-shape.bone,.ct-shape.fork,.ct-shape.leaf{background:none;width:auto}
#gameScr .gbody:has(.ct-map),#gameScr .gbody:has(.ct-canvas),#gameScr .gbody:has(.ct-memory),#gameScr .gbody:has(.ct-certificate){justify-content:flex-start;overflow-y:auto}.ct-controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:12px auto}.ct-controls .bbtn{padding:9px 17px;font-size:18px;min-height:44px}.ct-memory{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;width:min(700px,100%)}.ct-memory-card{border:3px solid #9db8e7;border-bottom-width:7px;border-radius:20px;background:#496dc3;color:white;min-height:135px;font:700 38px Nunito,Arial;cursor:pointer}.ct-memory-card.revealed{background:white;color:#253b5a;font-size:15px}.ct-memory-card img{display:block;object-fit:contain;width:100%;height:100px}.ct-memory-card.matched{border-color:#42ba80;background:#effff4}.ct-map{display:grid;gap:5px;width:min(410px,100%);padding:8px;background:#d6e2f7;border-radius:16px}.ct-cell{aspect-ratio:1;display:grid;place-items:center;background:white;border-radius:8px;font-size:36px}.ct-cell.wall{background:#c5cee0}.ct-canvas{width:min(900px,100%);height:auto;border:3px solid #bdd2f0;border-radius:18px;background:white;touch-action:none}.ct-swatch{border:2px solid #b6c6dd;background:white;border-radius:50%;font-size:30px;width:44px;height:44px;cursor:pointer}.ct-certificate{width:min(800px,100%);background:#fffbed;border:4px solid #e3bf5a;border-radius:24px;padding:25px;text-align:center}.written-answer{box-sizing:border-box;display:block;width:min(700px,100%);min-height:64px;border:2px solid #bdcde5;border-radius:12px;padding:12px;margin:12px auto;font:18px Nunito,Arial}.reflection-row{display:flex;align-items:center;gap:12px;padding:12px;background:white;border-radius:14px;font-size:19px}.reflection-row input{width:24px;height:24px}.bank .chip img{width:65px;height:65px;object-fit:contain;display:block;margin:auto}.bank .chip{white-space:normal}.sample-answer{max-width:650px;padding:15px}.opt:focus-visible,.mitem:focus-visible,.ocard:focus-visible,.pick:focus-visible,.bin:focus-visible,button:focus-visible{outline:4px solid #f4ae23;outline-offset:3px}
@media(max-width:600px){.ct-memory{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ct-memory-card{min-height:105px}.ct-memory-card img{height:70px}.ct-shape{max-width:80px}.ct-cell{font-size:28px}.ct-certificate{padding:12px}.ct-visual{gap:8px}.ct-controls{gap:6px}.ct-controls .bbtn{padding:8px 12px}}
@media print{body *{visibility:hidden}.ct-certificate,.ct-certificate *{visibility:visible}.ct-certificate{position:absolute;left:0;top:0;width:90%;border:4px solid #d3ab35}.ct-certificate button,.ct-certificate input{display:none}}
/* Option choices: compact, comfortable, and well-proportioned. */
#gameScr .cards3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;width:100%;max-width:780px;margin:12px auto}
#gameScr .cards3:has(.opt:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:580px;gap:16px}
#gameScr .cards3:has(.opt:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:640px;gap:14px}
@media(min-width:850px){#gameScr .cards3:has(.opt:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr));max-width:840px}}

#gameScr .cards3 .opt{box-sizing:border-box;height:auto;min-height:74px;padding:12px 14px 34px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;border-radius:20px;border-width:3px;border-bottom-width:8px}
#gameScr .cards3 .opt:has(img),#gameScr .cards3 .opt:has(.ct-visual){min-height:125px;max-height:155px;padding:10px 10px 32px}
#gameScr .cards3 .opt img{height:72px;max-height:75px;width:auto;max-width:92%;object-fit:contain;flex-shrink:0}
#gameScr .cards3 .opt:has(img) .otext,#gameScr .cards3 .opt:has(.ct-visual) .otext{text-align:center;padding:2px 4px;font-size:15.5px}
#gameScr .cards3 .opt .radio{position:absolute;left:50%;right:auto;top:auto;bottom:6px;transform:translateX(-50%);width:22px;height:22px;font-size:13px}
@media(max-width:560px){#gameScr .cards3 .opt:has(img),#gameScr .cards3 .opt:has(.ct-visual){min-height:115px;max-height:140px;padding:8px 8px 30px}#gameScr .cards3 .opt img{height:58px}#gameScr .cards3 .opt:has(img) .otext,#gameScr .cards3 .opt:has(.ct-visual) .otext{font-size:14px}}
.ct-shape.sock{font-size:0;background:var(--ink);width:var(--sz);height:var(--sz);clip-path:polygon(45% 0,85% 0,85% 65%,40% 100%,0 85%,0 65%,45% 45%)}
/* Chapter hub: balanced 2-column card layout. */
#chapScr .hub{max-width:1050px;padding:16px 20px 36px;margin:0 auto}
#chapCards{width:100%;max-width:980px;margin:24px auto 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
#chapCards .pcard{min-height:116px;padding:14px 16px;gap:14px;border-radius:24px;border-width:3px;border-bottom-width:8px}
#chapCards .pcard:last-child:nth-child(odd){grid-column:1/-1;max-width:480px;margin-inline:auto;width:100%}
#chapCards .ic{width:54px;height:54px;flex:0 0 54px;font-size:28px;font-family:"Segoe UI Emoji","Segoe UI Symbol",sans-serif!important;display:flex;align-items:center;justify-content:center}
#chapCards .tt{font-family:'Fredoka','Segoe UI',sans-serif!important;font-size:18px;font-weight:700;line-height:1.25}
#chapCards .dd{font-size:12.5px;line-height:1.35}
#chapCards .arrow-circle{width:34px;height:34px;flex:0 0 34px}
@media(max-width:700px){#chapCards{grid-template-columns:1fr;gap:14px}#chapCards .pcard:last-child:nth-child(odd){max-width:none}#chapCards .pcard{min-height:100px}#chapScr .hub{padding:14px}}

/* Reference: question, illustration, then answers. */
#gameScr .gbody{justify-content:flex-start!important;padding-top:24px!important;gap:18px;overflow-y:auto}
#gameScr .qbig{font-family:Fredoka,'Segoe UI',sans-serif!important;font-size:clamp(20px,2.2vw,27px);font-weight:700;line-height:1.3;color:#2944be;text-align:center;max-width:850px;margin:0 auto 2px}
#gameScr .qsub,#gameScr .hintline{margin:0;text-align:center}
#gameScr .qimg{width:auto;max-width:min(350px,82%);height:clamp(160px,29vh,280px);max-height:none;object-fit:contain;background:transparent;border:0;box-shadow:none;border-radius:0}
#gameScr .ogrid{width:min(900px,100%);margin:16px auto;gap:22px;align-items:stretch}
#gameScr .ocard{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:245px;padding:16px;position:relative}
#gameScr .ocard img{width:100%;height:180px;object-fit:contain;background:transparent;border:0;box-shadow:none}
#gameScr .ocard .ot{font:600 19px Fredoka,'Segoe UI',sans-serif;line-height:1.3;margin-top:12px}
#gameScr .cards3{margin-top:14px}
#gameScr img{mix-blend-mode:multiply}
#gameScr .qimg,#gameScr .ocard img,#gameScr .opt img{animation:ct-bob 3.5s ease-in-out infinite}
#gameScr .ocard:nth-child(2) img,#gameScr .opt:nth-child(2) img{animation-delay:-1s}
#gameScr .ocard:nth-child(3) img,#gameScr .opt:nth-child(3) img{animation-delay:-2s}
#dots{max-width:180px;flex-wrap:wrap;gap:4px}
#dots .dot{width:7px;height:12px}
@keyframes ct-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media(prefers-reduced-motion:reduce){#gameScr img{animation:none!important}}
@media(max-width:600px){#gameScr .gbody{padding-top:16px!important;gap:12px}#gameScr .ogrid{gap:10px;margin:8px auto}#gameScr .ocard{min-height:160px;padding:8px}#gameScr .ocard img{height:100px}#gameScr .ocard .ot{font-size:15px}#gameScr .qimg{height:180px}}
@media(min-width:760px){#gameScr .cards3:has(.opt:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr));max-width:900px}#gameScr .cards3:has(.opt:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr));max-width:940px}#gameScr .cards3 .opt:has(.ct-visual){min-height:160px}}
#gameScr .ocard:nth-child(3n+1){background:linear-gradient(145deg,#fff,#e7f9ee);border-bottom-color:#2da75f}
#gameScr .ocard:nth-child(3n+2){background:linear-gradient(145deg,#fff,#fff2d9);border-bottom-color:#f09a26}
#gameScr .ocard:nth-child(3n){background:linear-gradient(145deg,#fff,#f0e5ff);border-bottom-color:#9149d5}
#gameScr .ocard.done{background:#e2ffec;border-color:#2da75f}
#gameScr .ocard .num{z-index:2}
#gameScr img{mix-blend-mode:normal}
/* Share unused stage height above and below the answers, keeping the prompt at the top. */
#gameScr .gbody > .ogrid,
#gameScr .gbody:not(:has(> .qimg)):not(:has(> .ct-visual)) > .cards3{
  margin-top:auto;
  margin-bottom:auto;
}
#gameScr .ocard .ot,#gameScr .opt .otext{overflow-wrap:anywhere}
@media(min-width:760px) and (max-height:800px){
  #gameScr .gbody:has(> .qimg){gap:12px}
  #gameScr .gbody > .qimg{height:140px}
  #gameScr .gbody:has(> .qimg) .opt:has(.ct-visual){min-height:145px}
}
@media(max-width:600px){#gameScr .gbody > .qimg{height:140px}}
#gameScr .bbtn:focus-visible{outline:2px solid #6186d9;outline-offset:3px}
#gameScr .bbtn:focus:not(:focus-visible){outline:none}

/* Keep progress numbers and spatial teaching diagrams consistent in RTL languages. */
#progPill,#dots,.ct-visual,.ct-map{direction:ltr}
.lang-item:disabled,.custom-dropdown-item:disabled{opacity:.5;cursor:not-allowed}
/* Reference header: activity dots fill the space before the right-hand controls. */
#gameScr .topbar #dots{flex:1 1 auto;max-width:none;min-width:50px;justify-content:center;flex-wrap:nowrap;gap:4px}
#gameScr .topbar #dots .dot{width:10px;height:18px;flex:0 0 10px}
#gameScr .topbar .statpill,#gameScr .topbar #sndBtn,#gameScr .topbar .settings-wrapper-outer{flex-shrink:0}
#gameScr .topbar .settings-wrapper-outer{margin-inline-end:0}
@media(min-width:761px){#gameScr .topbar{flex-wrap:nowrap}#gameScr .topbar .gname{max-width:38%;}#gameScr .topbar .lvl{max-width:30%;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:760px){#gameScr .topbar #dots{display:flex;flex:1 1 100%;order:6;min-height:18px}}
@media(max-width:600px){
  #gameScr .ogrid:has(> .ocard:nth-child(3):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  #gameScr .ogrid > .ocard:nth-child(3):last-child{grid-column:1 / -1;justify-self:center;width:calc((100% - 10px) / 2);box-sizing:border-box}
}
#gameScr #nextBtn{outline:none!important}
#gameScr #nextBtn:focus-visible{box-shadow:inset 0 0 0 2px #fff,0 5px 12px #3156ad33}
.ct-visual img{width:72px;height:72px;object-fit:contain}
.ct-token{font:700 48px/1.2 'Segoe UI',sans-serif;color:#3152bb}
.ct-shape.heightbar{width:30px;height:var(--sz);border-radius:5px}
#gameScr .gbody>.ct-visual{min-height:100px;align-items:center;gap:16px;margin:8px auto;flex-wrap:wrap}
#gameScr #gbody .opt .ct-visual{gap:6px;flex-wrap:nowrap;min-height:60px}
#gameScr #gbody .opt .ct-visual img{width:48px;height:60px}
#gameScr #gbody .opt .ct-token{font-size:34px}
@media(max-width:600px){#gameScr .gbody>.ct-visual{gap:8px}.ct-visual img{width:52px;height:60px}#gameScr #gbody .opt .ct-visual img{width:38px;height:48px}}
