/* 波波乐园 · Focus Mathematics (Year 4–6, English). Everything is scoped under .fm. */
.fm{--fm-card:#fff;--fm-card2:#fffaf0;--fm-line:#e7dcc6;--fm-line2:#cdbb98;--fm-muted:#6b5a48;--fm-accent:#2c6fd6;--fm-accent-soft:#e2edff;
  --fm-good:#1f9d55;--fm-good-soft:#dcf5e6;--fm-bad:#e0413c;--fm-bad-soft:#ffe3e1;--fm-sun-soft:#fff3c9;
  --fm-grass:#7cc96a;--fm-grass-dark:#3f8a35;--fm-soil:#c9a27a;--fm-shadow:rgba(43,29,20,.22);
  --pv4:#f9b3cc;--pv4-ink:#9b1d4d;--pv3:#ffd877;--pv3-ink:#8a5a00;--pv2:#a6e09a;--pv2-ink:#246b1c;--pv1:#9dd0f5;--pv1-ink:#145a8c;--pv0:#cdbbf6;--pv0-ink:#55309b;
  --accent:var(--fm-accent);--accent-soft:var(--fm-accent-soft);--accent-ink:#fff;--card:var(--fm-card);--card2:var(--fm-card2);--line:var(--fm-line);--line2:var(--fm-line2);
  --muted:var(--fm-muted);--good:var(--fm-good);--good-soft:var(--fm-good-soft);--bad:var(--fm-bad);--bad-soft:var(--fm-bad-soft);--sun-soft:var(--fm-sun-soft);--sun:#ffb12b;
  --grass:var(--fm-grass);--grass-dark:var(--fm-grass-dark);--soil:var(--fm-soil);--shadow:var(--fm-shadow);
  width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-family:"Baloo 2","Noto Sans SC",sans-serif;font-size:17px;line-height:1.5;color:var(--ink);-webkit-user-select:text;user-select:text;text-align:left}
.fm *,.fm *::before,.fm *::after{box-sizing:border-box}
.fm .num,.fm .fm-vert,.fm table{font-variant-numeric:tabular-nums}
.fm p{margin:.25em 0}
.fm h3{font-family:"Baloo 2",sans-serif;font-weight:800}
.fm .note{color:var(--muted);font-size:.9rem}
.fm .hl{color:var(--bad);font-weight:700}
.fm .kw{font-weight:800;color:var(--accent)}
.fm .fm-speak{width:38px;height:38px;flex:none;border-radius:50%;border:3px solid var(--ink);background:#7fe3f2;display:inline-grid;place-items:center;cursor:pointer;box-shadow:0 3px 0 var(--ink);color:var(--ink);padding:0}
.fm .fm-speak svg{width:18px;height:18px}
.fm .fm-acts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.fm .fm-fp{margin-left:auto;font-size:.85rem;color:var(--muted)}
.fm .fm-got:disabled{opacity:.45;cursor:default}

/* learn card */
.fm-para-h{display:flex;gap:10px;align-items:center;margin-bottom:8px}
.fm-para-n{font:800 1.2rem/1 "Baloo 2",sans-serif;background:var(--accent);color:#fff;border:3px solid var(--ink);border-radius:12px;padding:6px 10px 3px}
.fm-para-h h3{flex:1;font-size:1.35rem;line-height:1.2}
.fm-para-b{margin-bottom:10px}

/* worked example */
.fm-ex{border:4px solid var(--ink);border-radius:18px;overflow:hidden;background:#fff}
.fm-ex-h{display:flex;align-items:center;gap:10px;background:var(--accent);color:#fff;padding:6px 14px;font-size:1.2rem}
.fm-ex-h .fm-pl{margin-left:auto;background:var(--pv4);color:var(--pv4-ink);border-radius:8px;padding:0 8px;font-weight:800;font-size:.85rem}
.fm-ex-h .fm-nr{background:#fff;color:var(--ink);border-radius:8px;padding:0 8px;font-size:.8rem;font-weight:700}
.fm-ex-b{padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.fm-ex .fm-acts{padding:0 14px 12px}
.fm-sol{display:inline-block;background:var(--accent-soft);color:var(--accent);font-weight:800;border-radius:8px;padding:1px 12px}
.fm-steps{display:flex;flex-direction:column;gap:10px}
.fm-step{border-left:5px solid var(--fm-grass);padding:4px 0 4px 12px;animation:fmRise .35s ease both}
.fm-step .sn{font-size:.75rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
@keyframes fmRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* practice */
.fm-qhead{display:flex;gap:10px;align-items:flex-start}
.fm-qno{font:800 1.1rem/1.4 "Baloo 2",sans-serif;color:var(--accent);min-width:2.6em}
.fm-qp{flex:1;min-width:0;font-size:1.1rem}
.fm-visual,.fm-canvas{margin-top:8px;max-width:100%;overflow-x:auto}
.fm-canvas canvas{width:100%;max-width:520px;height:auto;display:block}
.fm-qbody{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.fm-fieldrow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:1.15rem}
.fm .fm-ans{font:700 1.1rem "Baloo 2",sans-serif;border:3px solid var(--ink);border-radius:12px;padding:4px 10px;background:#fffdf5;color:var(--ink);min-width:0;max-width:100%}
.fm .fm-ans.ok{border-color:var(--good);background:var(--good-soft)}
.fm .fm-ans.no{border-color:var(--bad);background:var(--bad-soft)}
.fm-opts{display:flex;flex-wrap:wrap;gap:10px}
.fm-opt{border:3px solid var(--ink);background:#fff;border-radius:14px;padding:8px 16px;cursor:pointer;font:700 1.05rem "Baloo 2",sans-serif;box-shadow:0 4px 0 var(--ink);color:var(--ink);min-height:48px}
.fm-opt[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent)}
.fm-opt.ok{background:var(--good-soft);border-color:var(--good)}.fm-opt.no{background:var(--bad-soft);border-color:var(--bad)}
.fm-pool{display:flex;flex-wrap:wrap;gap:8px;min-height:58px;padding:8px;border-radius:14px;background:var(--card2);border:3px dashed var(--line2)}
.fm-chip{font:800 1.2rem "Baloo 2",sans-serif;border:3px solid var(--ink);background:#fff;border-radius:12px;padding:4px 14px 2px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;box-shadow:0 4px 0 var(--ink);min-height:44px;display:inline-flex;align-items:center}
.fm-chip.picked{background:var(--accent-soft);border-color:var(--accent)}
.fm-chip.ok{background:var(--good-soft);border-color:var(--good)}.fm-chip.no{background:var(--bad-soft);border-color:var(--bad)}
.fm-slots{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fm-slot{min-width:96px;min-height:52px;border:3px dashed var(--line2);border-radius:12px;display:flex;align-items:center;justify-content:center;padding:3px;background:#fff}
.fm-slot.over,.fm-bin.over{border-color:var(--accent);background:var(--accent-soft)}
.fm-slot .fm-chip{box-shadow:none}
.fm .dirlab{font-size:.9rem;font-weight:700;color:var(--muted)}
.fm-bins{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:10px}
.fm-bin{border:3px dashed var(--line2);border-radius:16px;padding:8px;min-height:110px;background:#fff}
.fm-bin h4{text-align:center;margin:0 0 6px;font:800 1.1rem "Baloo 2",sans-serif}
.fm-bin .in{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.fm-ghost{position:fixed;z-index:999;pointer-events:none;opacity:.95;display:flex;align-items:center;justify-content:center;box-shadow:0 12px 24px var(--fm-shadow)!important;transition:width .12s,height .12s}
.fm-demo{background:#fff;border:3px solid var(--ink);border-radius:14px;padding:10px 14px}
.fm-demo-k{display:inline-block;background:var(--fm-grass);border:2px solid var(--ink);border-radius:8px;padding:0 10px;font-weight:800;margin-bottom:4px}

/* shared visuals (from the lesson pages) */
.fm .tipbox{border:3px dashed var(--grass);background:#effaea;border-radius:14px;padding:10px 14px}
.fm .tipbox .tt{font-weight:800;color:var(--grass-dark)}
.fm .flow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fm .flow .fb{border:3px solid var(--ink);background:#fff;border-radius:12px;padding:6px 12px;font-weight:700;text-align:center;box-shadow:0 3px 0 var(--ink)}
.fm .fm-arr{color:var(--grass-dark);font-weight:800;font-size:1.3rem}
.fm .grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px}
.fm .stack{display:flex;flex-direction:column;gap:8px}
.fm .eqbox{display:inline-block;background:var(--bad-soft);border:3px solid var(--bad);border-radius:12px;padding:2px 14px;font-weight:800;font-size:1.15rem}
.fm .okbox{display:inline-block;background:var(--good-soft);border:3px solid var(--good);border-radius:12px;padding:2px 14px;font-weight:800}
.fm .scrollx{overflow-x:auto;max-width:100%}
.fm .tiles{display:inline-flex;gap:4px;align-items:flex-start;vertical-align:middle}
.fm .tilecol{display:flex;flex-direction:column;gap:3px;min-width:2.6em}
.fm .tile{font:800 1.6rem/1.45 "Baloo 2",sans-serif;border-radius:10px;padding:2px 8px 0;text-align:center;border:3px solid var(--ink)}
.fm .tile.sm{font-size:1.15rem;padding:0 6px;border-width:2px;border-radius:8px}
.fm .tlab{font-size:.7rem;text-align:center;line-height:1.15;border-radius:6px;padding:3px 2px;background:#fff;border:2px solid var(--line2)}
.fm .tval{font-size:.85rem;text-align:center;font-weight:700;border-radius:6px;padding:2px;border:2px solid var(--line2)}
.fm .pv0{background:var(--pv0);color:var(--pv0-ink)}.fm .pv1{background:var(--pv1);color:var(--pv1-ink)}.fm .pv2{background:var(--pv2);color:var(--pv2-ink)}
.fm .pv3{background:var(--pv3);color:var(--pv3-ink)}.fm .pv4{background:var(--pv4);color:var(--pv4-ink)}.fm .pv5{background:var(--accent-soft);color:var(--accent)}
.fm .tile.mark{border-color:var(--bad);box-shadow:0 0 0 3px var(--bad)}
.fm .tile.dim{opacity:.35}
.fm .tile.glow{animation:fmGlow 1s ease-in-out infinite alternate}
@keyframes fmGlow{to{box-shadow:0 0 0 5px #ffb12b}}
.fm table.pt{border-collapse:separate;border-spacing:0;border:3px solid var(--bad);border-radius:10px;overflow:hidden}
.fm table.pt th,.fm table.pt td{border-right:1px solid #f0a5a2;border-bottom:1px solid #f0a5a2;padding:5px 10px;text-align:center;background:#fff}
.fm table.pt th{background:var(--bad-soft);text-align:left;white-space:nowrap}
.fm table.pt tr:last-child>*{border-bottom:0}.fm table.pt tr>*:last-child{border-right:0}
.fm table.dt{border-collapse:collapse;background:#fff}
.fm table.dt th,.fm table.dt td{border:2px solid var(--ink);padding:5px 12px;text-align:center}
.fm table.dt th{background:#d7f2cf}
.fm .ro{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#fff;border:2px solid var(--line2);border-radius:12px;padding:6px 12px}
.fm .ro .k{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);min-width:7.5em;font-weight:700}
.fm .ro .v{font-weight:700;min-width:0;overflow-wrap:anywhere}
.fm .ro .v.big{font-size:1.7rem;font-weight:800}
.fm .readout{display:grid;gap:6px;margin-top:10px}
.fm .fb{font-weight:700}
.fm .fb.ok{color:var(--good)}.fm .fb.no{color:var(--bad)}.fm .fb.info{color:var(--muted)}

/* column sums */
.fm .vert{display:inline-grid;font:800 1.45rem/1.35 "Baloo 2",sans-serif;justify-items:center;background:#fff;border:3px solid var(--ink);border-radius:12px;padding:6px 14px;vertical-align:middle}
.fm .vert .c{width:1.05em;text-align:center}
.fm .vert .cr{font-size:.7em;color:var(--bad);line-height:1}
.fm .vert .ln{border-top:3px solid var(--ink)}
.fm .vert .x{text-decoration:line-through;text-decoration-color:var(--bad);opacity:.7}
.fm .vert input.c{width:1.2em;font:inherit;text-align:center;border:2px solid var(--line2);border-radius:6px;background:#fffdf5;padding:0;height:1.45em;color:var(--ink)}
.fm .vert input.c.ok{border-color:var(--good);background:var(--good-soft)}.fm .vert input.c.no{border-color:var(--bad);background:var(--bad-soft)}

/* widgets */
.fm .widget{background:#fff;border:3px solid var(--ink);border-radius:16px;padding:12px;box-shadow:0 4px 0 var(--ink);margin-top:8px}
.fm .ctrl{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:10px}
.fm .ctrl label{font-size:.9rem;font-weight:700;color:var(--muted);display:flex;gap:6px;align-items:center}
.fm .ctrl input[type=text],.fm .ctrl select{font:700 1rem "Baloo 2",sans-serif;border:3px solid var(--ink);background:#fffdf5;color:var(--ink);border-radius:10px;padding:3px 8px;width:7.5em}
.fm .ctrl input[type=range]{width:min(220px,50vw);accent-color:var(--accent)}
.fm .btnrow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fm .street{position:relative;padding:8px 6px 0;overflow-x:auto}
.fm .houses{display:flex;gap:6px;justify-content:center;align-items:flex-end;min-width:max-content;padding:0 8px;position:relative;z-index:1}
.fm .house{display:flex;flex-direction:column;align-items:center;width:84px;position:relative}
.fm .house .roof{width:96px;height:38px;clip-path:polygon(50% 0,100% 100%,0 100%);margin-bottom:-2px}
.fm .house .body{width:78px;background:#fff;border:3px solid currentColor;border-bottom:0;border-radius:4px 4px 0 0;padding:6px 4px 0;display:flex;flex-direction:column;align-items:center;gap:4px}
.fm .house .dg{font:800 2rem/1.2 "Baloo 2",sans-serif;width:52px;text-align:center;border-radius:8px;background:#fffdf5;border:2px solid var(--line2)}
.fm .house .ud{display:flex;gap:4px}
.fm .house .ud button{width:32px;height:28px;border-radius:7px;border:2px solid var(--ink);background:#fff;cursor:pointer;font-size:.7rem;line-height:1;color:var(--ink)}
.fm .house .door{width:22px;height:20px;border-radius:11px 11px 0 0;background:currentColor;opacity:.6}
.fm .house .plabel{font-size:.75rem;font-weight:700;text-align:center;line-height:1.15;min-height:2.3em;display:flex;align-items:center;margin-top:6px}
.fm .house.on .dg{border-color:var(--bad);box-shadow:0 0 0 3px var(--bad-soft)}
.fm .ground{height:26px;margin-top:-1px;border-radius:0 0 12px 12px;background:linear-gradient(var(--grass) 0 9px,var(--soil) 9px);position:relative;border:3px solid var(--ink)}
.fm .shadowfoot{position:absolute;bottom:-8px;left:8%;right:8%;height:10px;border-radius:50%;background:var(--shadow);filter:blur(3px);z-index:-1}
.fm .canvas-wrap{width:100%;max-width:560px}.fm .canvas-wrap canvas{width:100%;height:auto;display:block}
.fm .fm-dots{display:inline-grid;gap:6px;padding:12px;border-radius:12px;border:3px solid var(--ink);transition:transform .5s cubic-bezier(.5,1.6,.5,1)}
.fm .fm-dot{width:16px;height:16px;border-radius:50%;display:inline-block;border:2px solid var(--ink)}
.fm .pairs{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-end}
.fm .pair{display:inline-flex;flex-direction:column;gap:6px;padding:6px;border-radius:12px;border:3px solid var(--ink);background:#fff}
.fm .pair.single{border-color:var(--bad);animation:fmBob 1s ease-in-out infinite alternate}
@keyframes fmBob{to{transform:translateY(-4px)}}
.fm .table-top{position:relative;padding:10px 6px 0}
.fm .table-top .plates{display:flex;flex-wrap:nowrap;gap:clamp(4px,1.5vw,10px);justify-content:center;align-items:flex-end;position:relative;z-index:1}
.fm .plate{flex:1 1 0;max-width:96px;min-width:0;min-height:58px;border-radius:50%/40%;background:radial-gradient(ellipse at 50% 40%,#fff 55%,#e2d6bd 56%,#fffaf0 80%);border:3px solid var(--ink);display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:2px;padding:10px 12px;position:relative}
.fm .plate::after{content:"";position:absolute;left:12%;right:12%;bottom:-8px;height:8px;border-radius:50%;background:var(--shadow);filter:blur(2px);z-index:-1}
.fm .cookie{width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#e9b56a,#c98a3c);box-shadow:inset -2px -2px 0 rgba(0,0,0,.15);position:relative;animation:fmPop .3s ease both;display:inline-block}
.fm .cookie::before{content:"";position:absolute;width:3px;height:3px;border-radius:50%;background:#5b3311;left:5px;top:5px;box-shadow:6px 3px 0 #5b3311,2px 8px 0 #5b3311}
@keyframes fmPop{from{transform:scale(.2) translateY(-30px);opacity:0}to{transform:none;opacity:1}}
.fm .tabletop-line{height:16px;border-radius:8px;background:linear-gradient(#c9a27a,#9c7a55);margin-top:-2px;border:3px solid var(--ink)}
.fm .jar-tray{display:flex;flex-wrap:wrap;gap:3px;max-width:240px;padding:8px;border-radius:12px;border:3px solid var(--ink);background:#fff}
.fm .slide-track{position:relative;height:120px;margin:10px auto;max-width:100%;overflow:hidden}
.fm .slide-col{position:absolute;top:0;height:28px;font-size:.62rem;text-align:center;color:var(--muted);line-height:1.1}
.fm .slide-dig{position:absolute;top:38px;width:2.4rem;height:2.6rem;display:grid;place-items:center;font:800 1.6rem "Baloo 2",sans-serif;border-radius:10px;border:2px solid var(--ink);transition:left .7s cubic-bezier(.4,1.4,.5,1),opacity .4s,background .3s}
.fm .slide-dig.new{background:var(--good-soft);color:var(--good);border-color:var(--good)}
.fm .slide-dig.rem{background:var(--sun-soft);border-color:#ffb12b}
.fm .slide-div{position:absolute;top:30px;bottom:6px;border-left:3px dashed var(--bad)}
.fm .chain{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font:800 1.35rem "Baloo 2",sans-serif}
.fm .chain .tk{padding:2px 10px 0;border-radius:10px;border:3px solid var(--ink);background:#fff}
.fm .chain .tk.op{border-color:transparent;background:none}
.fm .chain .tk.act{border-color:var(--accent);background:var(--accent-soft)}
.fm .chain .tk.fm-res{border-color:var(--good);background:var(--good-soft);animation:fmPop .4s}
.fm .log{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.fm svg text{font-family:"Baloo 2",sans-serif}
@media (prefers-reduced-motion: reduce){.fm *{animation:none!important;transition:none!important}}

/* ---- step-by-step questions: each step opens after the one before is right ---- */
.fm-stepsq{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:10px;counter-reset:none}
.fm-sq{border:3px solid var(--ink);border-radius:16px;background:#fff;padding:10px 12px;transition:opacity .3s}
.fm-sq.later{opacity:.45;pointer-events:none;border-style:dashed;border-color:var(--line2)}
.fm-sq.later .fm-part{display:none}
.fm-sq.now{box-shadow:0 0 0 4px #ffe38a}
.fm-sq.done{background:var(--good-soft);border-color:var(--good)}
.fm-sq.done .fm-part{pointer-events:none;opacity:.85}
.fm-sq.reveal{animation:fmRise .4s ease both}
.fm-sqh{display:flex;gap:10px;align-items:flex-start;margin-bottom:6px}
.fm-sqn{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:800;background:var(--accent);color:#fff;border:2px solid var(--ink);padding-top:2px}
.fm-sq.done .fm-sqn{background:var(--good)}
.fm-sqh small{display:block;font-size:.75rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.fm-sqp{font-size:1.05rem}
.fm-sqdone{margin-top:6px;font-weight:700;color:var(--good)}
.fm-dopt{display:inline-block;min-width:1.6em;text-align:center;font-weight:800;font-size:1.3rem;border-radius:8px;padding:0 4px}
.fm-demosteps{margin:6px 0;padding-left:1.3em;display:flex;flex-direction:column;gap:4px}
.fm-demosteps li{animation:fmRise .4s ease both;animation-delay:var(--t)}
.fm-demosteps b{margin-left:6px;color:var(--good)}

/* ---- cards: drag into a sentence, houses, number line, bar model, match rows, sign ---- */
.fm-cardpool{min-height:56px}
.fm-chip.sm{font-size:1rem;padding:4px 10px 2px}
.fm-cslot{min-width:72px}
.fm-stage{margin-top:10px}
.fm-L-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:1.1rem}
.fm-L-sign{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.fm-bignum{font-size:1.8rem;font-weight:800;background:#fff;border:3px solid var(--ink);border-radius:14px;padding:4px 16px 0}
.fm-L-sign .fm-cslot{min-width:70px;min-height:60px;font-size:1.6rem}
.fm-L-houses .house .body .fm-cslot{min-width:52px;width:52px;min-height:52px;border-width:2px;background:#fffdf5}
.fm-L-houses .house .body .fm-chip{padding:2px 8px 0;box-shadow:none;font-size:1.5rem}
.fm-nlwrap{padding:46px 40px 64px;overflow-x:auto}
.fm-nl{position:relative;height:4px;background:var(--accent);border-radius:2px;min-width:420px}
.fm-nl::before,.fm-nl::after{content:"";position:absolute;top:-7px;border:9px solid transparent}
.fm-nl::before{left:-16px;border-right-color:var(--accent)}.fm-nl::after{right:-16px;border-left-color:var(--accent)}
.fm-tick{position:absolute;top:-12px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center}
.fm-tick>i{display:block;width:3px;height:28px;background:var(--accent);border-radius:2px}
.fm-ticklab{margin-top:6px;display:flex;flex-direction:column;align-items:center;gap:2px;white-space:nowrap;font-weight:700}
.fm-ticklab .fm-cslot{min-width:84px;min-height:40px}
.fm-barwrap{max-width:560px}
.fm-barwhole{display:flex;align-items:center;justify-content:center;gap:8px}
.fm-barwhole small{font-weight:800;color:var(--muted)}
.fm-brace{height:12px;border:3px solid var(--bad);border-bottom:0;border-radius:6px 6px 0 0;margin:4px 0}
.fm-bar{display:flex;border:3px solid var(--ink);border-radius:10px;overflow:hidden;min-height:64px}
.fm-barpart{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px;background:var(--pv2)}
.fm-barpart+.fm-barpart{border-left:3px solid var(--ink)}
.fm-barpart.pv1{background:var(--pv1)}.fm-barpart.pv4{background:var(--pv4)}
.fm-barpart small{font-weight:700;font-size:.75rem}
.fm-barpart b .pv4{font-size:1.6rem}
.fm-L-match{display:flex;flex-direction:column;gap:8px}
.fm-matchrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.fm-matchleft{min-width:200px}

/* ---- column sums and the slider ---- */
.fm .fm-colgrid input.fm-carry{width:1.1em;height:1.1em;font-size:.65em;color:var(--bad);border:1.5px dashed var(--line2);border-radius:4px;background:transparent;text-align:center;padding:0}
.fm-slider{display:flex;align-items:center;gap:10px;margin-top:6px}
.fm-slider input{flex:1;max-width:420px;accent-color:var(--accent);height:30px}
.fm-slideval{display:inline-block;margin-top:6px;font-size:1.3rem;border:3px solid var(--line2);border-radius:12px;padding:2px 12px 0;background:#fff}
.fm-slideval.ok{border-color:var(--good);background:var(--good-soft)}.fm-slideval.no{border-color:var(--bad);background:var(--bad-soft)}
@media (max-width:650px){
  .fm .houses{gap:3px;padding:0 2px}
  .fm .house{width:58px}.fm .house .roof{width:66px;height:28px}.fm .house .body{width:54px}
  .fm .house .plabel{font-size:.62rem}
  .fm-L-houses .house .body .fm-cslot{min-width:42px;width:42px;min-height:44px}
  .fm-L-houses .house .body .fm-chip{font-size:1.2rem;padding:2px 6px 0}
  .fm-nlwrap{padding:46px 30px 64px}.fm-nl{min-width:300px}
  .fm-ticklab .fm-cslot{min-width:70px}
}

/* progress dots for steps */
.fm-stepbar{display:flex;gap:6px;align-items:center;margin:8px 0}
.fm-stepbar i{width:26px;height:10px;border-radius:6px;border:2px solid var(--ink);background:#fff}
.fm-stepbar i.done{background:var(--good)}.fm-stepbar i.now{background:#ffd34a}
.fm-ex .fm-acts .fm-stepbar{margin:0 auto 0 0}
/* step-by-step questions: only the current step is open; finished steps shrink to one line; later steps are not shown */
.fm-sq.later{display:none}
.fm-sq.done{padding:6px 10px}
.fm-sq.done .fm-part{display:none}
.fm-sq.done .fm-sqh{margin:0;align-items:center}
.fm-sq.done .fm-sqp{display:none}
.fm-sq.done .fm-sqdone{margin:2px 0 0 40px}
.fm-sq.done .fm-sqdone:empty{display:none}
/* example: one step shown at a time, inside a fixed box */
.fm-stepview{min-height:120px}
.fm-stepview .fm-step{animation:fmRise .3s ease both}
/* formula pictures side by side */
.fm-para-b .grid2{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.fm-para-b .grid2 svg{width:120px;height:auto}
.fm-step svg,.fm-stepview svg{display:block;margin:6px 0;max-width:100%}

/* Number-name answers accept digits too; keep the instruction visible after typing. */
.fm .fm-number-hint{display:block;flex-basis:100%;font-size:.85rem;font-weight:500;line-height:1.5;color:var(--muted)}
 .fm .fd-control .fm-number-hint{flex-basis:auto;max-width:100%;overflow-wrap:anywhere}

/* ---- Pilot A: hands-on models from the Focus Mathematics cutouts ---- */
.fm-tool{margin:10px 0 12px;padding:10px 12px;border:3px solid #e4d7bb;border-radius:16px;background:#fffaf0;box-shadow:0 3px 0 #e4d7bb}
.fm-tool-h{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0 0 8px}
.fm-tool-h b{font:800 15px/1.2 "Baloo 2",sans-serif;color:#7a4b17}
.fm-tool-h small{font-size:12px;color:#8b6a45;padding:2px 8px;border-radius:8px;background:#fff;border:1px solid #e4d7bb;white-space:nowrap}
.fm-tool-h small.ok{border-color:#7bc98b;background:#e8f8e9;color:#236b34}
.fm-tool-h .btn{margin-left:6px;min-height:40px;padding:4px 10px;font-size:13px}
.fm-tool-h .btn:first-of-type{margin-left:auto}
.fm-tool-art{display:block;width:auto;max-width:100%;max-height:64px;object-fit:contain;pointer-events:none;user-select:none}
.fm-mt-visual{display:flex;align-items:center;gap:8px}
.fm-mt-icon{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:48px;font:800 13px/1 "Baloo 2",sans-serif;color:#4a3520}
.fm-mt-box .fm-tool-art{max-height:48px}
.fm-mt-bar{flex:1;min-width:120px;height:28px;display:flex;border:3px solid var(--ink);border-radius:14px;background:#fff;overflow:hidden}
.fm-mt-blue{width:43.75%;background:#4d9dff}
.fm-mt-red{width:0;background:#ff7b6b;transition:width .16s ease-out}
.fm-mt-slider{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;font-weight:700;color:#5c4326}
.fm-mt-slider input{flex:1;min-width:120px;accent-color:#e84a5f}
.fm-mt-read{margin-top:6px;padding:5px 8px;border-radius:10px;background:#fff;border:2px solid #e4d7bb;font:800 16px/1.2 "Baloo 2",sans-serif;color:#4a3520;text-align:center}
.fm-mt-read.ok{border-color:#7bc98b;background:#e8f8e9;color:#236b34}
.fm-nt-row{display:flex;gap:8px;flex-wrap:wrap;min-height:74px;align-items:flex-end}
.fm-nt-bag{position:relative;width:124px;height:104px;display:grid;place-items:center;isolation:isolate}
.fm-nt-bag>.fm-nt-bagimg{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;z-index:0;opacity:.95}
.fm-nt-book{position:absolute;z-index:1;width:48px;height:48px;object-fit:contain;left:50%;top:54%;transform:translate(-50%,-50%)}
.fm-nt-count{position:absolute;z-index:2;right:10px;top:8px;min-width:26px;height:26px;border-radius:50%;border:2px solid var(--ink);background:var(--sun);color:var(--ink);display:grid;place-items:center;font:800 14px/1 'Baloo 2',sans-serif;box-shadow:0 2px 0 var(--ink)}
/* houses: use the cutout as the building, keep the drop slot in its blank body */
.fm .house.fm-house-art{flex:0 0 84px;width:84px!important;height:84px!important;justify-content:flex-end;margin-bottom:2px}
.fm .house.fm-house-art .roof,.fm .house.fm-house-art .door,.fm .house.fm-house-art .shadowfoot{display:none}
.fm .house.fm-house-art .fm-house-img{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;z-index:0}
.fm .house.fm-house-art .body{position:absolute;z-index:1;left:23%;right:23%;top:40%;bottom:8%;width:auto;padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:center}
.fm .house.fm-house-art .fm-cslot{min-width:32px!important;width:32px!important;min-height:32px!important;height:32px!important;padding:0!important;border-width:2px;border-style:dashed;border-color:#9a6a3a;background:#fff8e6b8;box-shadow:none}
.fm .house.fm-house-art .fm-chip{min-width:0!important;min-height:0!important;height:32px!important;font-size:1.35rem!important;padding:0!important;align-items:center;justify-content:center;box-shadow:none}
@media(max-width:760px){
 .fm .house.fm-house-art{flex:0 0 58px;width:58px!important;height:58px!important}
 .fm .house.fm-house-art .fm-cslot{min-width:24px!important;width:24px!important;min-height:24px!important;height:24px!important}
 .fm .house.fm-house-art .fm-chip{min-width:0!important;min-height:0!important;height:22px!important;font-size:1.05rem!important;padding:0!important;align-items:center;justify-content:center;box-shadow:none}
 .fm-tool{padding:8px 9px}
 .fm-mt-visual{gap:5px}
 .fm-mt-icon{min-width:38px;font-size:11px}
 .fm-tool-art{max-height:48px}
 .fm-nt-bag{width:96px;height:82px}
 .fm-nt-book{width:38px;height:38px}
 .fm-nt-count{min-width:22px;height:22px;font-size:12px;right:6px;top:6px}
 .fm-tool-h .btn{min-height:36px;font-size:12px;padding:3px 8px}
 .fm-tool .fm-mt-read{display:none}
 .fm-tool-h small{font-size:11px;padding:1px 5px}
}

/* Pilot A · round-off ruler and ribbon sharing */
.fm-rr{position:relative;height:92px;margin:8px 0 2px;padding-top:24px}
.fm-rr-img{position:absolute;left:0;right:0;bottom:0;width:100%;height:58px;object-fit:fill;opacity:.72;transform:rotate(-2deg);pointer-events:none}
.fm-rr-scale{position:absolute;left:0;right:0;top:0;height:100%;font:800 12px/1 "Baloo 2",sans-serif;color:#5c4326}
.fm-rr-scale span{position:absolute;transform:translateX(-50%);white-space:nowrap}
.fm-rr-scale span.mid{color:#9a6a3a;font-weight:700}
.fm-rr-marker{position:absolute;top:18px;bottom:2px;width:4px;left:50%;transform:translateX(-50%);background:#e0413c;border-radius:3px;box-shadow:0 0 0 2px #fff8e6;transition:left .55s cubic-bezier(.3,1.3,.5,1)}
.fm-rr-marker:before{content:"";position:absolute;left:50%;top:-8px;width:12px;height:12px;border-radius:50%;background:#e0413c;border:2px solid #fff;transform:translateX(-50%)}
.fm-rb-row{display:flex;align-items:center;gap:8px;margin-top:4px;min-height:72px}
.fm-rb-roll{width:64px;max-height:64px;object-fit:contain;flex:none}
.fm-rb-strip{display:flex;gap:2px;flex:1;min-width:0;height:38px;border:3px solid var(--ink);border-radius:10px;overflow:hidden;background:#fff}
.fm-rb-strip i{flex:1;background:#f06aa8;transition:transform .35s,background .35s}
.fm-rb-strip.cut i:nth-child(2){transform:translateY(5px);background:#e84f95}
.fm-rb-strip.cut i:nth-child(3){transform:translateY(-5px);background:#f58bc0}
.fm-rb-gifts{display:flex;gap:3px;opacity:.25;transition:opacity .3s}
.fm-rb-gifts.show{opacity:1}
.fm-rb-gift{width:34px;max-height:34px;object-fit:contain}
@media(max-width:760px){
 .fm-rr{height:78px;padding-top:22px}
 .fm-rr-img{height:46px}
 .fm-rr-scale{font-size:10px}
 .fm-rb-row{gap:5px;min-height:58px}
 .fm-rb-roll{width:48px;max-height:48px}
 .fm-rb-strip{height:30px}
 .fm-rb-gift{width:25px;max-height:25px}
}

/* Focus activities use readable objects and touch targets, including on phones. */
.fm .fm-speak{width:48px;height:48px}
.fm .canvas-wrap,.fm-canvas canvas{max-width:800px}
.fm-para-b .grid2{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))}
.fm-para-b .grid2 svg{width:100%;max-width:360px}
.fm .widget canvas{max-width:none}
.fm .fm-colgrid input.c{min-width:44px;min-height:48px}
.fm-tool-h b{font-size:19px}.fm-tool-h small{font-size:16px;white-space:normal}
.fm-tool-h .btn{min-height:48px;font-size:17px}
.fm-tool-art{max-height:88px}.fm-mt-box .fm-tool-art{max-height:68px}
.fm-mt-icon{min-width:54px;font-size:17px}.fm-mt-bar{height:42px}
.fm-mt-visual{flex-wrap:wrap}.fm-mt-bar{min-width:100px}
.fm-mt-slider{font-size:17px}.fm-mt-slider input{min-height:48px}
.fm .house.fm-house-art{flex:0 0 112px;width:112px!important;height:112px!important}
.fm .house.fm-house-art .fm-cslot{min-width:48px!important;width:48px!important;min-height:48px!important;height:48px!important}
.fm .house.fm-house-art .fm-chip{height:44px!important;font-size:1.5rem!important}
.fm-nt-bag{width:144px;height:122px}.fm-nt-book{width:62px;height:62px}
.fm-nt-count{min-width:32px;height:32px;font-size:18px}
.fm-rr{height:120px}.fm-rr-img{height:80px}.fm-rr-scale{font-size:16px}
.fm-rb-row{flex-wrap:wrap;min-height:92px}.fm-rb-roll{width:80px;max-height:80px}
.fm-rb-strip{height:48px;min-width:90px}.fm-rb-gift{width:44px;max-height:44px}
