/* Kalkil — "Les petits" pre-reader world */
.m-petits{background:linear-gradient(135deg,#ff7eb3,#a66cff);--edge:#7b3fd0}
.m-petits .sym svg{width:40px;height:40px}
#petits{background:linear-gradient(180deg,#ffe3f1 0%,#efe6ff 50%,#fff7df 100%);position:relative;overflow:hidden}
body:has(#petits.active){background-attachment:fixed;background:linear-gradient(180deg,#ffe3f1 0%,#efe6ff 50%,#fff7df 100%)}
.ptop{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;z-index:2}
.pbtn{width:56px;height:56px;border-radius:50%;background:#fff;color:#7b3fd0;display:grid;place-items:center;box-shadow:0 5px 0 rgba(123,63,208,.22),0 8px 14px rgba(32,51,77,.12);transition:transform .1s}
.pbtn svg{width:30px;height:30px}
.pbtn:active{transform:translateY(4px);box-shadow:0 1px 0 rgba(123,63,208,.22)}
.psay{background:#a66cff;color:#fff;box-shadow:0 5px 0 #7b3fd0,0 8px 14px rgba(32,51,77,.15);animation:psayPulse 2.6s ease-in-out infinite}
@keyframes psayPulse{50%{transform:scale(1.06)}}
.pprog{display:flex;gap:4px}
.pprog i{width:30px;height:30px;display:block}
.pprog i svg{width:100%;height:100%}
.pprog i.on{animation:pstarIn .5s cubic-bezier(.3,1.7,.5,1)}
@keyframes pstarIn{0%{transform:scale(.3) rotate(-40deg)}100%{transform:scale(1)}}
.pmenu{display:flex;flex-direction:column;flex:1}
.ptitle{margin:6px 0 0;text-align:center;font-size:40px;font-weight:900;color:#fff;-webkit-text-stroke:2px #7b3fd0;paint-order:stroke fill;text-shadow:0 4px 0 #ff7eb3}
.psub{margin:4px 0 14px;text-align:center;font-weight:800;font-size:15px;opacity:.75}
.ptiles{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.ptile{position:relative;border-radius:26px;background:#fff;padding:12px 8px 12px;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:142px;box-shadow:0 7px 0 var(--edge,#d9c9f5),0 12px 18px rgba(32,51,77,.12);transition:transform .12s cubic-bezier(.3,1.6,.5,1)}
.ptile:active{transform:translateY(5px) scale(.98);box-shadow:0 2px 0 var(--edge,#d9c9f5)}
.ptile .part{width:100%;max-width:150px;height:84px;display:block}
.ptile .part svg{width:100%;height:100%}
.ptile .pname{font-weight:900;font-size:19px}
.ptile .pst{position:absolute;top:8px;right:10px;font-weight:900;font-size:14px;color:#e59f00}
.pt-shapes{background:#fff1f1;--edge:#ffc2c2}.pt-colors{background:#eef5ff;--edge:#bcd6fb}.pt-numbers{background:#effbf3;--edge:#b8e8c8}.pt-count{background:#fff6e6;--edge:#ffd9a1}
.pt-odd{grid-column:span 2;background:#f5eeff;--edge:#d9c5fb;flex-direction:row;justify-content:center;min-height:104px;gap:14px}
.pt-odd .part{width:170px;height:76px;flex:none}
.pplay{display:flex;flex-direction:column;flex:1;gap:10px;position:relative;z-index:1}
.pq{margin:10px 0 0;text-align:center;font-weight:900;font-size:21px;min-height:28px;color:#4a2b80}
.pchoices{flex:1;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:16px;padding:6px 0 10px}
.pc{width:calc(50% - 8px);max-width:190px;aspect-ratio:1/1;border-radius:30px;background:#fff;display:grid;place-items:center;padding:14px;box-shadow:0 7px 0 #e2d6f7,0 12px 20px rgba(32,51,77,.12);transition:transform .15s,opacity .3s}
.pc svg{width:100%;height:100%;overflow:visible}
[data-game="colors"] .pc{padding:8px 18px}
.pc:active{transform:translateY(5px) scale(.97);box-shadow:0 2px 0 #e2d6f7}
.pc.yes{animation:pyes .7s cubic-bezier(.3,1.6,.5,1) forwards;box-shadow:0 0 0 6px #ffc93c,0 7px 0 #e2d6f7,0 12px 24px rgba(255,201,60,.6);z-index:2}
@keyframes pyes{0%{transform:scale(1)}35%{transform:scale(1.18) rotate(-4deg)}65%{transform:scale(1.05) rotate(3deg)}100%{transform:scale(1.1)}}
.pc.fade{opacity:.35}
.pc.wob{animation:pwob .5s ease}
@keyframes pwob{20%{transform:rotate(-7deg)}40%{transform:rotate(6deg)}60%{transform:rotate(-4deg)}80%{transform:rotate(2deg)}}
.pc.hint{animation:phint 1.1s ease-in-out infinite;box-shadow:0 0 0 5px #a66cff,0 7px 0 #e2d6f7}
@keyframes phint{50%{transform:scale(1.07)}}
.pchoices.small{flex:none;flex-wrap:nowrap;gap:12px;padding-bottom:6px}
.pchoices.small .pc{width:calc(33.3% - 8px);max-width:130px;padding:10px;border-radius:26px}
.pfield{flex:1;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.55);border-radius:30px;padding:10px;min-height:0}
.pobjs{display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:8px;max-width:360px}
.pobj{position:relative;width:84px;height:84px;background:transparent;padding:4px;border-radius:50%;transition:transform .15s}
.pobjs.c6 .pobj,.pobjs.c7 .pobj,.pobjs.c8 .pobj{width:76px;height:76px}
.pobjs.c9 .pobj,.pobjs.c10 .pobj{width:66px;height:66px}
.pobj svg{width:100%;height:100%}
.pobj.done{transform:scale(.9);background:rgba(255,201,60,.35)}
.pbadge{position:absolute;right:-2px;top:-2px;min-width:30px;height:30px;padding:0 6px;border-radius:15px;background:#7b3fd0;color:#fff;font-size:19px;font-weight:900;display:none;place-items:center;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.pobj.done .pbadge{display:grid;animation:pstarIn .35s cubic-bezier(.3,1.7,.5,1)}
.pwin{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;position:relative;z-index:1}
.pbig{width:220px;height:220px;animation:pbig 1.4s cubic-bezier(.3,1.6,.5,1) both,pfloat 3s 1.4s ease-in-out infinite}
.pbig svg{width:100%;height:100%;filter:drop-shadow(0 10px 18px rgba(229,159,0,.45))}
@keyframes pbig{0%{transform:scale(0) rotate(-180deg)}100%{transform:scale(1) rotate(0)}}
@keyframes pfloat{50%{transform:translateY(-10px) rotate(4deg)}}
.pwtxt{font-size:26px;font-weight:900;color:#4a2b80;text-align:center;margin:0 10px}
.pwbtns{display:flex;gap:26px;margin-top:10px}
.pwb{width:86px;height:86px}
.pwb svg{width:44px;height:44px}
.pfx{position:absolute;inset:0;pointer-events:none;z-index:5;overflow:hidden}
.pfx i{position:absolute;width:12px;height:12px;border-radius:50%;margin:-6px 0 0 -6px;animation:pspark .85s ease-out forwards}
@keyframes pspark{to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}
.pfx i.cf{top:-20px;width:10px;height:16px;border-radius:3px;margin:0;animation:pfall 2.6s ease-in forwards}
@keyframes pfall{to{transform:translateY(110vh) rotate(var(--r))}}
@media (max-height:700px){.ptile{min-height:118px}.ptile .part{height:66px}.ptitle{font-size:34px}.pt-odd{min-height:86px}.pc{max-width:150px}.pobj{width:70px;height:70px}}
@media (min-width:600px){.pc{max-width:200px}}
@media (prefers-reduced-motion:reduce){.psay,.pbig,.pc.hint{animation:none}}
@media (min-height:760px){.ptiles{gap:16px}.ptile{min-height:172px;padding-top:18px}.ptile .part{height:100px}.pt-odd{min-height:116px}.ptitle{margin-top:14px;font-size:46px}.psub{margin-bottom:22px}}
.pobjs.c1 .pobj,.pobjs.c2 .pobj,.pobjs.c3 .pobj{width:104px;height:104px}
.pq{text-wrap:balance}

/* fast taps: stop double-tap-to-zoom from swallowing a child's quick second tap */
#petits,#petits button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
