/* SparkGlee — Learning Support packs (dyslexia, dyscalculia, focus, speech).
 * twins · trace · soundboxes · quicklook · tenframe · gonogo · soundcoach. Every rule is scoped
 * under .g-<id>. Trick demos (shown in Pip's modal) are wrapped in the same .g-<id> class. */

@keyframes d2-pop { from { opacity: 0; transform: scale(.5) translateY(14px); } }
@keyframes d2-pulse { 50% { transform: scale(1.08); } }
@keyframes d2-bob { 50% { transform: translateY(-8px); } }
@keyframes d2-glow { 50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, .6), 0 0 26px rgba(255, 255, 255, .8); } }
@keyframes d2-shimmer { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes d2-grow-y { from { transform: scaleY(0); } }
@keyframes d2-grow { from { transform: scale(0); } }
@keyframes d2-fade { from { opacity: 0; } }

/* ===================================================================== twins */
.g-twins { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 12px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08)); font-family: 'Lexend', 'Fredoka', sans-serif; }
.g-twins .tw-lake { position: absolute; left: -10%; right: -10%; bottom: -30px; height: 46%; border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(140, 230, 255, .55), rgba(80, 160, 255, .35)); pointer-events: none; }
.g-twins .tw-shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.g-twins .tw-shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); animation: d2-shimmer 6s ease-in-out infinite; }
.g-twins .tw-top { display: flex; gap: 14px; align-items: center; justify-content: center; position: relative; z-index: 1; flex-wrap: wrap; }
.g-twins .tw-hook { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 22px; background: linear-gradient(180deg, #fff, #eef1ff);
  box-shadow: 0 5px 0 rgba(43, 27, 79, .15); opacity: 0; transform: scale(.7); transition: all .35s cubic-bezier(.2, .9, .3, 1.4); }
.g-twins .tw-hook.on { opacity: 1; transform: none; }
.g-twins .tw-hook.pulse { animation: d2-pulse .8s 2; }
.g-twins .tw-hook-pic { font-size: 40px; }
.g-twins .tw-hook-letter { font-size: 44px; font-weight: 700; color: #5b4bd8; letter-spacing: .06em; }
.g-twins .tw-pic { width: 96px; height: 96px; border-radius: 30px; background: radial-gradient(circle at 35% 30%, #fff, #e7ecff); box-shadow: 0 7px 0 rgba(43, 27, 79, .18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 54px; line-height: 1; }
.g-twins .tw-pic small { font-size: 16px; margin-top: 2px; }
.g-twins .tw-word { position: relative; z-index: 1; display: flex; gap: .12em; font-size: clamp(46px, 13vw, 76px); font-weight: 600; color: #2b1b4f;
  letter-spacing: .12em; background: rgba(255, 255, 255, .9); border-radius: 24px; padding: 6px 22px; box-shadow: 0 6px 0 rgba(43, 27, 79, .15); }
.g-twins .tw-gap { display: inline-flex; align-items: center; justify-content: center; min-width: .8em; border-bottom: 6px dashed #8f7bff; color: #b9b0e6; }
.g-twins .tw-gap.filled { color: #19a974; border-bottom-color: #19a974; animation: d2-pop .4s; }
.g-twins .tw-choices { position: relative; z-index: 1; max-width: 560px; }
.g-twins .tw-choices .choice { min-height: 104px; background: linear-gradient(180deg, #ffffff 0%, #f3f0ff 55%, #e5ddff 100%); position: relative; overflow: hidden; }
.g-twins .tw-choices .choice::before { content: ''; position: absolute; left: 10%; right: 10%; top: 6px; height: 36%; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); pointer-events: none; }
.g-twins .tw-letter { font-family: 'Lexend', 'Fredoka', sans-serif; font-size: clamp(56px, 15vw, 84px); font-weight: 500; letter-spacing: .05em; line-height: 1; position: relative; }
.prompt-text .tw-target, .prompt-text .tw-say { font-family: 'Lexend', 'Fredoka', sans-serif; font-size: 1.5em; color: #5b4bd8; letter-spacing: .08em; padding: 0 4px; }
.g-twins.tw-demo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px; background: none; }
.g-twins .tw-big { font-size: 80px; font-weight: 600; letter-spacing: .12em; color: #5b4bd8; animation: d2-pop .5s; }
.g-twins .tw-cap { font-size: 22px; font-weight: 600; }
.g-twins .tw-build { position: relative; width: 120px; height: 150px; }
.g-twins .tw-build .stick { position: absolute; top: 0; width: 16px; height: 150px; border-radius: 10px; background: linear-gradient(180deg, #ffb347, #ff6f91); transform-origin: top; animation: d2-grow-y .7s both; }
.g-twins .tw-build .ball { position: absolute; bottom: 0; width: 80px; height: 80px; border-radius: 50%; border: 16px solid #5b8cff; box-sizing: border-box; animation: d2-grow .6s .8s both; }
.g-twins .tw-build.b .stick { left: 10px; } .g-twins .tw-build.b .ball { left: 18px; }
.g-twins .tw-build.d .stick { right: 10px; animation-delay: .8s; } .g-twins .tw-build.d .ball { right: 18px; animation-delay: 0s; }
.g-twins .tw-bed { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 10px 10px 30px; min-height: 150px; }
.g-twins .tw-hand { display: flex; flex-direction: column; align-items: center; font-size: 70px; line-height: 1; animation: d2-pop .5s; }
.g-twins .tw-hand.l { transform: scaleX(-1); }
.g-twins .tw-hand.l b { transform: scaleX(-1); }
.g-twins .tw-hand b, .g-twins .tw-e { font-size: 54px; font-weight: 600; color: #5b4bd8; }
.g-twins .tw-e { align-self: flex-end; margin: 0 10px 2px; animation: d2-pop .5s .5s both; }
.g-twins .tw-mattress { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 46px; animation: d2-pop .5s .9s both; }
.g-twins .tw-pair { display: flex; align-items: center; gap: 14px; font-size: 64px; }
.g-twins .tw-pair b { font-weight: 600; color: #5b4bd8; letter-spacing: .06em; }
.g-twins .tw-arrow { font-size: 34px; animation: d2-bob 1s infinite; }

/* ===================================================================== trace */
.g-trace { display: flex; flex-direction: column; padding: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .1)); min-height: 320px; }
.g-trace .tr-pad { position: relative; flex: 1; min-height: 300px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(circle at 20% 15%, #fffdf6, #fff3fb 55%, #f1e9ff); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .9), 0 8px 0 rgba(43, 27, 79, .12); }
.g-trace .tr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.g-trace .tr-start { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #a6ffcf, #22c983); color: #fff; font: 700 22px/46px 'Fredoka', sans-serif; text-align: center;
  box-shadow: 0 0 0 4px #fff, 0 4px 12px rgba(0, 0, 0, .2); animation: d2-pulse 1.4s ease-in-out infinite; z-index: 2; }
.g-trace .tr-start.nudge { animation: d2-pulse .35s 3; }
.g-trace .tr-pad.complete { box-shadow: inset 0 0 0 5px #7ef0b4, 0 0 30px #7ef0b4; }
.g-trace .tr-pad.is-correct { background: radial-gradient(circle at 20% 15%, #fffdf6, #e6fff2 60%, #d3fbe7) !important; }
.prompt-text .tr-say { font-family: 'Lexend', 'Fredoka', sans-serif; font-size: 1.4em; color: #b06bff; letter-spacing: .1em; }
.g-trace.tr-demo { display: flex; justify-content: center; min-height: 0; background: none; }
.g-trace .tr-dgl { position: relative; padding: 10px 30px; }
.g-trace .tr-dgl b { font-family: 'Lexend', 'Fredoka', sans-serif; font-size: 130px; line-height: 1; font-weight: 400; color: #e4dbff; -webkit-text-stroke: 3px #b06bff; letter-spacing: .1em; }
.g-trace .tr-ddot { position: absolute; left: 30px; top: 18px; width: 38px; height: 38px; border-radius: 50%; background: #22c983; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px #fff; animation: d2-pulse 1.2s infinite; }
.g-trace .tr-ddot.two { left: auto; right: 20px; top: auto; bottom: 18px; background: #ff6fb5; }
.g-trace .tr-dfinger { position: absolute; left: 30px; top: 20px; font-size: 44px; font-style: normal; animation: tr-down 1.8s ease-in-out infinite; }
@keyframes tr-down { 0% { transform: translate(0, 0); } 60% { transform: translate(0, 90px); } 100% { transform: translate(60px, 90px); } }

/* ===================================================================== soundboxes */
.g-soundboxes { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 14px; padding: 14px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08)); font-family: 'Lexend', 'Fredoka', sans-serif; }
.g-soundboxes .sb-top { display: flex; align-items: center; gap: 14px; }
.g-soundboxes .sb-pic { width: 120px; height: 120px; border-radius: 36px; background: radial-gradient(circle at 35% 30%, #fff, #fff1e0); box-shadow: 0 8px 0 rgba(43, 27, 79, .16);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 70px; line-height: 1; }
.g-soundboxes .sb-pic small { font-size: 18px; }
.g-soundboxes .sb-slow { min-height: 72px; padding: 0 18px; border-radius: 24px; background: linear-gradient(180deg, #a6ffcf, #22c983); color: #fff; font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 0 #149a63; font-family: 'Fredoka', sans-serif; }
.g-soundboxes .sb-slow:active { transform: translateY(4px); box-shadow: 0 2px 0 #149a63; }
.g-soundboxes .sb-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; width: 100%; max-width: calc(var(--n) * 108px); }
.g-soundboxes .sb-box { aspect-ratio: 1; min-height: 64px; border-radius: 18px; border: 4px dashed rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center; font-size: clamp(30px, 9vw, 52px); font-weight: 600; color: #2b1b4f; letter-spacing: .06em; transition: background .25s, transform .2s; }
.g-soundboxes .sb-box.drop-over { background: rgba(255, 255, 255, .75); transform: scale(1.06); }
.g-soundboxes .sb-box.full { border-style: solid; background: rgba(255, 255, 255, .85); }
.g-soundboxes .sb-box.letter { background: linear-gradient(180deg, #fff, #fff2d9); animation: d2-pop .35s; }
.g-soundboxes .sb-box.next { box-shadow: 0 0 0 4px #ffe066; }
.g-soundboxes .sb-box.sb-unused { opacity: .25; }
.g-soundboxes .sb-row.complete .sb-box { background: linear-gradient(180deg, #b9ffd9, #6ee7a8); border-color: #fff; }
.g-soundboxes .sb-chip, .g-soundboxes .sb-token { display: block; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc93c 45%, #ff9f1c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .18); }
.g-soundboxes .sb-chip { animation: d2-pop .3s; }
.g-soundboxes .sb-bottom { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.g-soundboxes .sb-tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 76px; padding: 8px 12px; border-radius: 26px; background: rgba(255, 255, 255, .25); }
.g-soundboxes .sb-token { width: 72px; height: 72px; cursor: grab; transition: transform .2s, opacity .2s; }
.g-soundboxes .sb-token.picked { transform: scale(1.15); box-shadow: 0 0 0 5px #fff, 0 0 20px #ffe066; }
.g-soundboxes .sb-token.gone { opacity: 0; transform: scale(0); pointer-events: none; width: 0; margin: 0 -5px; }
.g-soundboxes .sb-check { width: 84px; height: 84px; border-radius: 50%; font-size: 44px; color: #fff; font-weight: 700; background: radial-gradient(circle at 35% 30%, #8fd3ff, #3b82f6); box-shadow: 0 6px 0 #2459b8; }
.g-soundboxes .sb-check:active { transform: translateY(4px); box-shadow: 0 2px 0 #2459b8; }
.g-soundboxes .sb-tile { min-width: 76px; height: 82px; padding: 0 14px; border-radius: 22px; font-size: 42px; font-weight: 600; letter-spacing: .06em; color: #2b1b4f;
  background: linear-gradient(180deg, #fff, #ffefd6); box-shadow: 0 6px 0 rgba(43, 27, 79, .18); font-family: 'Lexend', 'Fredoka', sans-serif; }
.g-soundboxes .sb-tile.used { visibility: hidden; }
.prompt-text .sb-say { font-size: 1.2em; }
.g-soundboxes.sb-demo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px; background: none; }
.g-soundboxes .sb-dpic { font-size: 70px; }
.g-soundboxes .sb-drow { display: flex; gap: 8px; }
.g-soundboxes .sb-drow i { width: 70px; height: 70px; border-radius: 16px; border: 4px dashed #ff9f1c; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 36px; font-weight: 600; color: #2b1b4f; }
.g-soundboxes .sb-drow i.on { border-style: solid; background: radial-gradient(circle, #ffc93c 0 34%, #fff 36%); animation: d2-pop .4s; }
.g-soundboxes .sb-drow i.on.txt { background: #fff2d9; }
.g-soundboxes .sb-dtok { font-size: 40px; animation: d2-bob 1s infinite; }
.g-soundboxes .sb-dword { font-size: 46px; font-weight: 600; letter-spacing: .1em; color: #ff6f91; }

/* ===================================================================== quicklook */
.g-quicklook { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 12px; padding: 14px 10px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .35), rgba(255, 255, 255, .06)); }
.g-quicklook .ql-ready { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 90px; animation: d2-pulse .9s infinite; transition: opacity .3s; z-index: 3; }
.g-quicklook .ql-ready.gone { opacity: 0; pointer-events: none; }
.g-quicklook .ql-wrap { position: relative; width: min(92%, 520px); min-height: 200px; display: flex; align-items: center; justify-content: center; }
.g-quicklook .ql-board { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; opacity: 0; transform: scale(.85); transition: opacity .18s, transform .25s; }
.g-quicklook .ql-wrap.shown .ql-board { opacity: 1; transform: none; }
.g-quicklook .ql-wrap.hidden .ql-board { opacity: 0; transform: scale(.92); }
.g-quicklook .ql-wrap.reveal .ql-board { opacity: 1; transform: none; }
.g-quicklook .ql-card { position: relative; width: clamp(140px, 40vw, 200px); aspect-ratio: 1; border-radius: 30px; background: linear-gradient(160deg, #ffffff, #eef3ff);
  box-shadow: 0 8px 0 rgba(43, 27, 79, .15), inset 0 0 0 4px #fff; }
.g-quicklook .ql-card.second { background: linear-gradient(160deg, #fffdf1, #fff0d6); }
/* Two groups (e.g. 5 + 3) sit side by side, so phones never push the first card off the top. */
.g-quicklook .ql-board.two { flex-wrap: nowrap; gap: 12px; }
.g-quicklook .ql-board.two .ql-card { width: clamp(120px, 40vw, 200px); }
.g-quicklook .ql-dot { position: absolute; width: 21%; aspect-ratio: 1; margin: -10.5% 0 0 -10.5%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--d2), var(--d1) 60%); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 3px 6px rgba(0, 0, 0, .15); }
.g-quicklook .ql-card.second .ql-dot { background: radial-gradient(circle at 35% 30%, #fff1a8, #ffb400 60%); border-radius: 30%; }
.g-quicklook .ql-frame { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; border-radius: 20px; background: #fff; width: min(84vw, 420px); box-shadow: 0 8px 0 rgba(43, 27, 79, .15); }
.g-quicklook .ql-frame i { aspect-ratio: 1; border-radius: 12px; background: #eef1fb; position: relative; }
.g-quicklook .ql-frame i.on::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--d2), var(--d1) 60%); }
.g-quicklook .ql-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 70px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.g-quicklook .ql-wrap.hidden .ql-cover { opacity: 1; }
.g-quicklook .ql-cover span { animation: d2-bob 2.4s ease-in-out infinite; }
.g-quicklook .ql-cover span:nth-child(2) { animation-delay: .4s; font-size: 1.2em; }
.g-quicklook .ql-choices { max-width: 520px; }
.g-quicklook .ql-sum { padding: 4px 22px; border-radius: 999px; background: #fff; color: #5b4bd8; font-weight: 700; font-size: clamp(26px, 7vw, 38px); box-shadow: 0 5px 0 rgba(43, 27, 79, .15); }
.g-quicklook .ql-peek { min-height: 56px; padding: 0 18px; border-radius: 20px; background: rgba(255, 255, 255, .9); font-weight: 700; font-size: 20px; color: #5b4bd8; box-shadow: 0 5px 0 rgba(43, 27, 79, .15); }
.g-quicklook.ql-demo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px; background: none; }
.g-quicklook .ql-dcard { position: relative; width: 170px; height: 170px; border-radius: 28px; background: #fff; box-shadow: 0 6px 0 rgba(43, 27, 79, .15); }
.g-quicklook .ql-dcard i { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a8cdff, #4d9bff 60%); animation: d2-pop .3s both; }
.g-quicklook .ql-dframe { display: grid; grid-template-columns: repeat(5, 46px); gap: 5px; padding: 8px; background: #fff; border-radius: 16px; }
.g-quicklook .ql-dframe i { height: 46px; border-radius: 10px; background: #eef1fb; }
.g-quicklook .ql-dframe i.on { background: radial-gradient(circle, #ff6b8b 0 52%, #eef1fb 55%); }
.g-quicklook .ql-dframe i.on.b { background: radial-gradient(circle, #ffb400 0 52%, #eef1fb 55%); }
.g-quicklook .ql-dnum { font-size: 46px; font-weight: 700; color: #5b4bd8; }

/* ===================================================================== tenframe */
.g-tenframe { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 12px; padding: 14px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08)); --ka: #ff5d73; --kb: #3b8bff; }
.g-tenframe .tf-frames { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 520px; align-items: center; }
.g-tenframe .tf-frames.two { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 900px; }
.g-tenframe .tf-frames.two .tf-frame, .g-tenframe .tf-frames.two .tf-pickframe { width: min(100%, 400px); }
.g-tenframe .tf-frame { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; width: min(100%, 480px); border-radius: 22px;
  background: linear-gradient(180deg, #8b5a2b, #6b3f1a); box-shadow: 0 8px 0 rgba(43, 27, 79, .2), inset 0 2px 0 rgba(255, 255, 255, .25); }
.g-tenframe .tf-cell { aspect-ratio: 1; min-height: 52px; border-radius: 14px; background: linear-gradient(180deg, #fffaf0, #f3e7d3); position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.g-tenframe .tf-cell.drop-over { background: #fff3b0; }
.g-tenframe .tf-cell.empty-glow { background: linear-gradient(180deg, #fffbe0, #ffe98a); animation: d2-pulse 1.6s ease-in-out infinite; }
.g-tenframe .tf-counter { display: block; width: 74%; aspect-ratio: 1; border-radius: 50%; font-style: normal; animation: d2-pop .3s;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .85), var(--ka) 45%); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15), 0 3px 6px rgba(0, 0, 0, .2); }
.g-tenframe .tf-counter.k-b { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .85), var(--kb) 45%); border-radius: 26%; }
.g-tenframe.tf-sym .tf-counter { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; }
.g-tenframe .tf-cell.moved .tf-counter { animation: d2-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
.g-tenframe .tf-pickframe { padding: 8px; border-radius: 28px; background: rgba(255, 255, 255, .4); box-shadow: 0 6px 0 rgba(43, 27, 79, .15); }
.g-tenframe .tf-pickframe .tf-cell { cursor: inherit; }
.g-tenframe .tf-pickframe.is-correct .tf-frame { box-shadow: 0 0 0 5px #7ef0b4; }
.g-tenframe .tf-eq { width: 100%; text-align: center; font-size: 40px; font-weight: 700; color: #fff; text-shadow: 0 3px 0 rgba(43, 27, 79, .25); animation: d2-pop .4s; }
.g-tenframe .tf-tools { display: flex; align-items: center; gap: 18px; }
.g-tenframe .tf-pot { width: 84px; height: 84px; border-radius: 26px; background: linear-gradient(180deg, #fff, #ffe9c7); box-shadow: 0 6px 0 rgba(43, 27, 79, .16); position: relative; display: flex; align-items: flex-end; justify-content: center; font-size: 40px; cursor: grab; }
.g-tenframe .tf-pot .pot-counter { position: absolute; top: 8px; width: 42px; }
.g-tenframe .tf-pot.picked { box-shadow: 0 0 0 5px #fff, 0 0 20px #ffe066; transform: scale(1.08); }
.g-tenframe .tf-count { min-width: 84px; height: 84px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 700; color: #2b1b4f; box-shadow: 0 6px 0 rgba(43, 27, 79, .16); }
.g-tenframe .tf-check { width: 84px; height: 84px; border-radius: 50%; font-size: 44px; color: #fff; font-weight: 700; background: radial-gradient(circle at 35% 30%, #a6ffcf, #22c983); box-shadow: 0 6px 0 #149a63; }
.g-tenframe .tf-check:active { transform: translateY(4px); box-shadow: 0 2px 0 #149a63; }
.prompt-text .tf-q { display: inline-block; min-width: 1.2em; color: #ff8a3d; }
.g-tenframe.tf-demo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px; background: none; }
.g-tenframe .tf-drow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.g-tenframe .tf-dframe { display: grid; grid-template-columns: repeat(5, 40px); gap: 4px; padding: 7px; background: #8b5a2b; border-radius: 14px; }
.g-tenframe .tf-dframe i { height: 40px; border-radius: 9px; background: #fffaf0; }
.g-tenframe .tf-dframe i.on { background: radial-gradient(circle, #ff5d73 0 54%, #fffaf0 57%); animation: d2-pop .3s; }
.g-tenframe .tf-dframe i.on.b { background: radial-gradient(circle, #3b8bff 0 54%, #fffaf0 57%); }
.g-tenframe .tf-dnum { font-size: 36px; font-weight: 700; color: #ff8a3d; }

/* ===================================================================== gonogo */
.g-gonogo { padding: 0; background: linear-gradient(180deg, #121a4a 0%, #2b2a7a 60%, #45358f 100%); min-height: 360px; display: flex; flex-direction: column; }
.g-gonogo .gn-sky { position: relative; flex: 1; min-height: 320px; overflow: hidden; }
.g-gonogo .gn-twinkle { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(2px 2px at 12% 20%, #fff, transparent), radial-gradient(2px 2px at 30% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 35%, #fff, transparent),
    radial-gradient(2px 2px at 78% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 88% 62%, #fff, transparent), radial-gradient(2px 2px at 42% 88%, #fff, transparent); animation: gn-tw 5s ease-in-out infinite; }
.g-gonogo .gn-twinkle.t2 { transform: translate(7%, 9%); animation-delay: 2.5s; }
@keyframes gn-tw { 50% { opacity: .25; } }
.g-gonogo .gn-hill { position: absolute; left: -10%; right: -10%; bottom: -60px; height: 110px; border-radius: 50%; background: linear-gradient(180deg, #2e5d6e, #1d3b4a); pointer-events: none; }
.g-gonogo .gn-item { position: absolute; left: 0; top: 0; width: 84px; height: 84px; padding: 0; background: none; border-radius: 50%; will-change: transform; touch-action: manipulation; }
.g-gonogo .gn-item .gn-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(255, 230, 120, .55)); }
.g-gonogo .gn-item .gn-emo { font-size: 64px; line-height: 84px; display: block; filter: drop-shadow(0 0 8px rgba(200, 220, 255, .5)); }
.g-gonogo .gn-item.is-correct { background: none !important; box-shadow: none !important; }
.g-gonogo .gn-item.caught { transition: opacity .4s, scale .4s; opacity: 0; scale: 1.6; }
.g-gonogo .gn-item.oops { transition: opacity .4s; opacity: .3; filter: grayscale(.6); }
.g-gonogo .gn-item.hint { border-radius: 50%; }
.g-gonogo .gn-rule { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 99px; background: rgba(255, 255, 255, .92); font-size: 26px; font-weight: 700; color: #2b1b4f; white-space: nowrap; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.g-gonogo .gn-rule.pop { animation: gn-rule .5s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes gn-rule { from { transform: translateX(-50%) scale(.6); } }
.g-gonogo .gn-mini { display: inline-block; width: 34px; height: 34px; }
.g-gonogo .gn-mini svg { width: 100%; height: 100%; }
.g-gonogo .gn-net { position: absolute; right: 12px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .9); font-size: 30px; }
.g-gonogo .gn-score { font-size: 28px; color: #2b1b4f; min-width: 1em; text-align: center; }
.g-gonogo.gn-demo { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: 24px; }
.g-gonogo .gn-drow { display: flex; gap: 22px; font-size: 70px; align-items: center; }
.g-gonogo .gn-drow .yes { filter: drop-shadow(0 0 12px #ffe066); animation: d2-pulse 1.2s infinite; }
.g-gonogo .gn-drow .no { opacity: .45; }
.g-gonogo .gn-drow .tap { animation: d2-pulse .6s infinite; }
.g-gonogo .gn-drow .red { color: #ff5d73; } .g-gonogo .gn-drow .blue { color: #4d9bff; }

/* ===================================================================== soundcoach */
.g-soundcoach { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 12px; padding: 14px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08)); }
.g-soundcoach .sc-top { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; width: 100%; }
.g-soundcoach .sc-left { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g-soundcoach .sc-sound { min-width: 76px; padding: 0 14px; height: 64px; border-radius: 22px; background: linear-gradient(180deg, #fff, #ffe7f0); color: #e0457b; font: 700 46px/64px 'Lexend', 'Fredoka', sans-serif; text-align: center; letter-spacing: .06em; box-shadow: 0 5px 0 rgba(43, 27, 79, .15); }
.g-soundcoach .sc-mouth { width: clamp(200px, 55vw, 280px); cursor: pointer; filter: drop-shadow(0 8px 0 rgba(43, 27, 79, .12)); }
.g-soundcoach .sc-svg { width: 100%; height: auto; display: block; }
.g-soundcoach .sc-svg .lip { fill: #e8566f; stroke: #c23b55; stroke-width: 2; }
.g-soundcoach .sc-svg .cave { fill: #6b1d34; }
.g-soundcoach .sc-svg .tooth { fill: #fff; stroke: #e6e0ea; stroke-width: 1.5; }
.g-soundcoach .sc-svg .tongue { fill: #ff8fa3; stroke: #e0607a; stroke-width: 2; }
.g-soundcoach .sc-svg .mo-air path { stroke: #7ab8ff; stroke-width: 4; stroke-linecap: round; fill: none; animation: sc-air 1.2s ease-in-out infinite; }
@keyframes sc-air { 0% { opacity: 0; transform: translateX(-6px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(10px); } }
.g-soundcoach .sc-svg .mo-lips .low { animation: sc-pop 1.6s ease-in-out infinite; transform-origin: 100px 66px; }
@keyframes sc-pop { 0%, 55%, 100% { transform: none; } 70% { transform: translateY(8px); } }
.g-soundcoach .sc-svg .tongue.up { animation: sc-tongue 2s ease-in-out infinite; transform-origin: 100px 98px; }
@keyframes sc-tongue { 50% { transform: translateY(-3px) scaleY(1.04); } }
.g-soundcoach .sc-svg .mo-round { animation: d2-pulse 1.6s ease-in-out infinite; transform-origin: 100px 72px; }
.g-soundcoach .sc-right { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g-soundcoach .sc-pip { width: 74px; height: 74px; }
.g-soundcoach .sc-word { min-width: 130px; padding: 10px 16px; border-radius: 28px; background: radial-gradient(circle at 35% 30%, #fff, #fff1e6); box-shadow: 0 7px 0 rgba(43, 27, 79, .15);
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.g-soundcoach .sc-emo { font-size: 64px; line-height: 1; }
.g-soundcoach .sc-word b { font: 600 26px 'Lexend', 'Fredoka', sans-serif; letter-spacing: .06em; color: #2b1b4f; }
.g-soundcoach .sc-area { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; min-height: 110px; }
.g-soundcoach .sc-mic { min-width: 200px; min-height: 92px; border-radius: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 26px;
  background: linear-gradient(180deg, #ff9ac1, #ff5c9a); color: #fff; font-weight: 700; font-size: 24px; box-shadow: 0 7px 0 #d23a77, 0 10px 24px rgba(255, 92, 154, .4); animation: d2-pop .4s; }
.g-soundcoach .sc-mic-ic { font-size: 40px; }
.g-soundcoach .sc-mic.listening { animation: sc-listen 1s ease-in-out infinite; }
@keyframes sc-listen { 50% { box-shadow: 0 7px 0 #d23a77, 0 0 0 14px rgba(255, 154, 193, .35); } }
.g-soundcoach .sc-tries { display: flex; gap: 8px; }
.g-soundcoach .sc-tries i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.g-soundcoach .sc-tries i.on { background: #fff; box-shadow: 0 0 8px #fff; }
.g-soundcoach .sc-heard { min-height: 26px; font-size: 20px; color: #fff; font-weight: 600; text-shadow: 0 2px 0 rgba(43, 27, 79, .25); }
.g-soundcoach .sc-picks { max-width: 560px; }
.g-soundcoach .sc-picks .choice { flex-direction: column; min-height: 120px; }
.g-soundcoach .sc-pemo { font-size: 60px; line-height: 1; }
.prompt-text .sc-say { font-family: 'Lexend', 'Fredoka', sans-serif; color: #e0457b; font-size: 1.3em; letter-spacing: .06em; }
.g-soundcoach.sc-demo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px; background: none; }
.g-soundcoach .sc-dm { width: 240px; }
.g-soundcoach .sc-dbig { font-size: 52px; font-weight: 700; color: #e0457b; }

/* ---------- small phones ---------- */
@media (max-width: 420px) {
  .g-twins .tw-choices .choice { min-height: 90px; }
  .g-soundboxes .sb-pic { width: 100px; height: 100px; font-size: 58px; }
  .g-soundboxes .sb-token { width: 64px; height: 64px; }
  .g-gonogo .gn-rule { font-size: 20px; }
  .g-soundcoach .sc-emo { font-size: 52px; }
}
/* ---------- accessibility ---------- */
.a11y-calm .g-twins .tw-shine::after, .a11y-calm .g-gonogo .gn-twinkle, .a11y-calm .g-quicklook .ql-cover span,
.a11y-calm .g-soundcoach .sc-svg * { animation: none !important; }
.a11y-motor .g-gonogo .gn-item { width: 104px; height: 104px; }
.a11y-motor .g-gonogo .gn-item .gn-emo { font-size: 80px; line-height: 104px; }
