/* Kalkil — Problèmes / Word problems (problems/problems.js). Light: no images, no web fonts; emoji + CSS motion. */
.m-prob{background:linear-gradient(135deg,#5fd08a,#1f9e74);--edge:#147255}
.m-prob .sym{font-size:34px}
@media (max-width:600px) and (max-height:700px){#calcul .modes.modes{gap:8px}#calcul .modes .mode.mode:not(.wide){min-height:80px;padding:9px 10px 8px}#calcul .modes .mode.mode:not(.wide) .sym{width:48px;height:48px}#calcul .modes .mode.mode.wide{min-height:52px;padding:6px 16px}#calcul .modes .mode.mode.wide .sym{width:42px;height:42px}}   /* Problèmes sits in Calcul (Nov 4): one more row, still no scroll at 360×640 */
#problems{background:linear-gradient(180deg,#e9fbf1 0%,#d9f5ff 60%,#f3fbff 100%);position:relative;overflow-x:hidden}
body:has(#problems.active){background:linear-gradient(180deg,#e9fbf1 0%,#d9f5ff 60%,#f3fbff 100%)}
#problems,#problems button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#problems .gtop h2{margin:0;font-size:18px;font-weight:900;text-align:center;flex:1;color:#13543f}
.pb-streak{display:flex;align-items:center;gap:3px;min-width:44px;justify-content:flex-end;font-weight:900;color:#a86a00}
.pb-streak svg{width:22px;height:22px}
.pb-streak.pop svg{animation:pbPop .5s}
.pb-start,.pb-game,.pb-end{display:flex;flex-direction:column;flex:1}
.pb-start{align-items:center;justify-content:center;gap:14px;text-align:center}
.pb-koko{display:inline-block;width:34px;height:40px;flex:none}
.pb-koko svg{width:100%;height:100%}
.pb-koko.lg{width:96px;height:112px;animation:pbBob 2.4s ease-in-out infinite}
.pb-lead{font-weight:900;font-size:20px;color:#13543f;margin:0 10px;line-height:1.3}
.pb-lvls{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pb-lvl{border:0;border-radius:999px;padding:10px 14px;font:inherit;font-weight:800;background:#fff;color:#13543f;box-shadow:0 3px 0 #bfe3d3}
.pb-lvl.on{background:#1f9e74;color:#fff;box-shadow:0 3px 0 #147255}
.pb-prog{display:flex;gap:5px;justify-content:center;margin:2px 0 6px}
.pb-prog i{width:18px;height:8px;border-radius:4px;background:#cfe7de}
.pb-prog i.cur{background:#2f8fdd}.pb-prog i.ok{background:#2fbf71}.pb-prog i.meh{background:#ffc93c}
.pb-card{position:relative;background:#fff;border-radius:20px;padding:12px 46px 12px 14px;box-shadow:0 4px 0 #cfe7de}
.pb-text{margin:0;font-size:19px;line-height:1.38;font-weight:700;color:#1d2b3a}
.pb-k{border-radius:6px;padding:0 2px;transition:background .3s}
.pb-text.hl .pb-k,.pb-fb .pb-k{background:#ffe066;box-shadow:0 0 0 2px #ffe066}
.pb-listen{position:absolute;right:6px;top:8px;width:38px;height:38px;border-radius:50%;border:0;background:#e3f4ff;color:#1f6fb5;padding:7px}
.pb-listen.on{background:#2f8fdd;color:#fff;animation:pbPulse 1s infinite}
.pb-scene{position:relative;min-height:96px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:8px 0 4px;padding:6px;border-radius:18px;background:rgba(255,255,255,.55)}
.pb-scene .pb-grp,.pb-scene .pb-row{display:flex;flex-wrap:wrap;gap:2px;justify-content:center;align-items:center;max-width:100%}
.pb-scene .pb-row{width:100%;justify-content:flex-start;padding-left:4px}
.pb-scene .pb-sg{font-size:26px;color:#1f9e74}
.pbo{font-style:normal;font-size:22px;line-height:1;display:inline-block}
.pb-scene.tens .pbo{font-size:16px}
.pb-ten{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:6px;background:#e3f4ff;box-shadow:inset 0 0 0 1.5px #b9dcf5;margin:2px;vertical-align:middle}
.pbd{flex:none;width:9px;height:9px;border-radius:50%;background:#2f8fdd;display:inline-block}
.pbd.x-b{background:#ff8b3d}.pbo.x-b{filter:saturate(1.4)}
.pb-scene .pb-tot{position:absolute;right:8px;bottom:4px;font-size:22px;font-weight:900;color:#13543f;background:#fff;border-radius:12px;padding:0 8px;box-shadow:0 2px 0 #cfe7de}
.pb-scene.anim .pb-tot{animation:pbPop .5s both;animation-delay:1.3s}
/* add: the second group flies in and joins */
.pb-scene.anim .x-in{animation:pbIn .6s both;animation-delay:calc(var(--d) * 40ms)}
/* take away: the leaving ones fly off */
.pb-scene.anim .x-away{animation:pbAway .8s both;animation-delay:calc(var(--d) * 45ms)}
/* compare: pairs line up (dim), the extras bounce */
.pb-scene.anim .x-pair{opacity:.45;transition:opacity .4s}
.pb-scene.anim .x-extra{animation:pbJump .6s both;animation-delay:calc(.4s + var(--d) * 50ms)}
.pbd.x-hole,.pb-scene .pbo.x-hole{opacity:.3}
.pb-scene.anim .pbd.x-hole{background:#ff8b3d;opacity:1}.pb-scene.anim .pbo.x-hole{opacity:1}
/* equal groups: the bags appear one by one */
.pb-bags{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.pb-bag{display:flex;flex-wrap:wrap;gap:1px;width:64px;min-height:40px;justify-content:center;align-content:center;padding:4px;border-radius:10px 10px 16px 16px;background:#f7d9a8;box-shadow:inset 0 -4px 0 #d9ad6a}
.pb-bag .pbo{font-size:15px}
.pb-scene.anim .pb-bag{animation:pbPop .5s both;animation-delay:calc(var(--g) * 300ms)}
.pb-say{display:flex;gap:8px;align-items:flex-start;margin:4px 0}
.pb-fb{margin:0;flex:1;background:#fff;border-radius:16px;padding:8px 12px;font-size:16px;font-weight:700;line-height:1.3;color:#1d2b3a;animation:pbIn .3s both}
.pb-fb.good{background:#e1f8ea;color:#13543f}.pb-fb.hint{background:#fff6d6;color:#6b4c00}
.pb-step{display:flex;flex-direction:column;gap:8px;margin-top:auto;padding-bottom:6px}
.pb-chips{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pb-chips.n3 .pb-chip:last-child{grid-column:1 / -1}
.pb-chip{border:0;border-radius:18px;padding:8px 6px;min-height:68px;font:inherit;font-weight:900;font-size:16px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:0 4px 0 rgba(0,0,0,.18)}
.pb-chip .pic{font-size:18px;display:flex;gap:3px;align-items:center}
.pb-chip .pic i{font-style:normal}.pb-chip .pic b{color:#fff}
.pb-chip .pic .gone{opacity:.35;transform:translate(4px,-6px) rotate(20deg)}
.pb-chip .pic .bx{background:rgba(255,255,255,.35);border-radius:6px;padding:0 2px}
.c-add{background:#2fbf71}.c-take{background:#ff7a59}.c-cmp{background:#8a63e8}.c-mul{background:#2f8fdd}
.pb-chip.wrong,.pb-op.wrong{animation:pbShake .5s}
.pb-chip.right{outline:4px solid #ffd23f;transform:scale(1.04)}
.pb-chip.show,.pb-op.show{animation:pbPulse 1s 3}
.pb-eq{display:flex;align-items:center;justify-content:center;gap:8px;font-size:30px;font-weight:900;color:#1d2b3a}
.pb-slot,.pb-ans{min-width:48px;height:50px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:3px dashed #9cc9b8;color:#1f9e74}
.pb-slot.set{border-style:solid;border-color:#1f9e74}
.pb-ans{min-width:70px;border-color:#2f8fdd;color:#1f6fb5}
.pb-ans.bad{border-color:#ff5a4e;color:#c3362b;animation:pbShake .5s}.pb-ans.good{border-color:#2fbf71;color:#1e9152;background:#e1f8ea;animation:pbPop .5s}
.pb-ans.nudge{animation:pbShake .4s}
.pb-ops{display:flex;gap:12px;justify-content:center}
.pb-op{width:76px;height:64px;border:0;border-radius:18px;font-size:34px;font-weight:900;background:#fff;color:#1f6fb5;box-shadow:0 4px 0 #bcd9ee}
.pb-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.pb-key{height:46px;border:0;border-radius:14px;font-size:22px;font-weight:900;background:#fff;color:#1d2b3a;box-shadow:0 3px 0 #cfe7de}
.pb-key.ok{background:#2fbf71;color:#fff;box-shadow:0 3px 0 #1e9152}.pb-key.del{background:#ffe2d6;color:#c3362b}
.pb-next{margin-top:4px}
.pb-end{align-items:center;justify-content:center;text-align:center;gap:8px}
.pb-bigstar{width:120px;height:120px;animation:pbPop .6s both}
.pb-etitle{font-size:24px;font-weight:900;color:#13543f;margin:0}
.pb-escore{font-size:19px;margin:0}
.pb-skills{display:flex;flex-direction:column;gap:6px;width:100%;max-width:340px;margin:6px 0}
.pb-skill{display:flex;gap:8px;align-items:center;background:#fff;border-radius:14px;padding:8px 12px;margin:0;font-weight:800}
.pb-skill span{flex:1;text-align:left}
@keyframes pbPop{0%{transform:scale(.3);opacity:0}70%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
@keyframes pbIn{0%{transform:translateX(60px) scale(.6);opacity:0}100%{transform:none;opacity:1}}
@keyframes pbAway{0%{transform:none;opacity:1}100%{transform:translate(40px,-70px) rotate(35deg) scale(.6);opacity:0}}
@keyframes pbJump{0%,100%{transform:none}50%{transform:translateY(-12px) scale(1.25)}}
@keyframes pbShake{0%,100%{transform:none}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-5px)}80%{transform:translateX(5px)}}
@keyframes pbPulse{0%,100%{box-shadow:0 0 0 0 rgba(255,210,63,.9)}50%{box-shadow:0 0 0 8px rgba(255,210,63,0)}}
@keyframes pbBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media (max-height:700px){.pb-text{font-size:17px;line-height:1.32}.pb-scene{min-height:80px;margin:6px 0 2px}.pbo{font-size:19px}.pb-chip{min-height:60px}.pb-key{height:42px}.pb-eq{font-size:26px}.pb-slot,.pb-ans{height:44px}.pb-fb{font-size:15px;padding:6px 10px}}
@media (prefers-reduced-motion:reduce){.pb-scene.anim *,.pb-koko.lg,.pb-bigstar{animation:none!important}}

/* encouragement: Koko dances on a right step, tilts kindly on a miss (Nov 4) */
.pb-say .pb-koko.dance{animation:pbDance .9s ease-in-out}
.pb-say .pb-koko.hmm{animation:pbHmm .9s ease-in-out}
@keyframes pbDance{0%,100%{transform:none}20%{transform:translateY(-8px) rotate(-12deg)}40%{transform:translateY(0) rotate(10deg)}60%{transform:translateY(-6px) rotate(-8deg)}80%{transform:rotate(6deg)}}
@keyframes pbHmm{0%,100%{transform:none}30%{transform:rotate(-14deg)}60%{transform:rotate(8deg)}}
@media (prefers-reduced-motion:reduce){.pb-say .pb-koko.dance,.pb-say .pb-koko.hmm{animation:none}}

/* « Quelle opération ? » (problems/qop.js, Nov 9): the Problèmes look; the 4 signs as big 2×2 buttons, then the keypad */
#qop{background:linear-gradient(180deg,#fff4e0 0%,#e3f4ff 60%,#f3fbff 100%);position:relative;overflow-x:hidden}
body:has(#qop.active){background:linear-gradient(180deg,#fff4e0 0%,#e3f4ff 60%,#f3fbff 100%)}
#qop,#qop button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#qop .gtop h2{margin:0;font-size:18px;font-weight:900;text-align:center;flex:1;color:#7a3d00}
.qo-entry{background:linear-gradient(135deg,#ff9f43,#f2711c);color:#fff;box-shadow:0 5px 0 #b9520f;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:900}
.qo-entry span{font-size:18px;letter-spacing:1px}
.qo-signs{margin:0;font-size:30px;letter-spacing:6px}
.qo-lvls{flex-direction:column;align-items:stretch;width:100%;max-width:320px}
.qo-lvls .pb-lvl{padding:12px 14px;font-size:16px}
#qop .pb-lvl.on{background:#f2711c;box-shadow:0 3px 0 #b9520f}
.qo-q{margin:8px 0 0;background:#fff;border-radius:14px;padding:8px 12px;font-weight:800;font-size:16px;line-height:1.3;color:#5c3300;box-shadow:0 3px 0 #f3d7b5}
.qo-q b{color:#f2711c;margin-right:4px}
.qo-ops{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.qo-op{border:0;border-radius:20px;min-height:76px;font:inherit;font-weight:900;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:0 5px 0 rgba(0,0,0,.2)}
.qo-op .e{font-size:34px;line-height:1}.qo-op .w{font-size:15px;opacity:.95}
.qo-op.o-a{background:#2fbf71}.qo-op.o-s{background:#ff7a59}.qo-op.o-m{background:#2f8fdd}.qo-op.o-d{background:#8a63e8}
.qo-op.wrong{animation:pbShake .5s;opacity:.45}
.qo-op.right{outline:4px solid #ffd23f;transform:scale(1.04)}
.qo-op.show{animation:pbPulse 1s 3;outline:4px solid #ffd23f}
.qo-eq{font-size:28px}
.qo-pose{border:0;border-radius:14px;min-height:46px;font:inherit;font-weight:900;font-size:16px;background:#fff6d6;color:#7a3d00;box-shadow:0 3px 0 #f3d7b5}
#qop .pb-fb{font-size:15px}
@media (max-height:700px){.qo-op{min-height:64px}.qo-op .e{font-size:28px}.qo-q{font-size:15px;padding:6px 10px;margin-top:6px}.qo-signs{font-size:24px}#qop .pb-koko.lg{width:72px;height:84px}.qo-lvls .pb-lvl{padding:10px 12px}.qo-pose{min-height:42px}.qo-eq{font-size:24px}}
@media (max-height:700px){#qop .pb-key{height:40px}#qop .pb-keys{gap:5px}#qop .pb-step{gap:6px}#qop .pb-say{margin:2px 0}}
