#kidsOv{position:fixed;inset:0;z-index:70;overflow:auto;background:linear-gradient(180deg,#FFF6DA 0%,#E6F6F1 100%);color:#17332F;font-family:inherit}
#kidsOv[hidden]{display:none}
#kidsOv .kw{max-width:560px;margin:0 auto;padding:12px 16px max(32px,env(safe-area-inset-bottom,0px))}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) #kidsOv{background:linear-gradient(180deg,#1E2B2A 0%,#0F1F1E 100%);color:#F2F7F5}}
:root[data-theme="dark"] #kidsOv{background:linear-gradient(180deg,#1E2B2A 0%,#0F1F1E 100%);color:#F2F7F5}
.kt{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.kt h2{margin:0;font-size:1.5rem;flex:1;text-align:center}
.kb{width:46px;height:46px;border-radius:50%;border:2px solid currentColor;background:transparent;color:inherit;font-size:1.4rem;cursor:pointer}
#kidsOv .kp{margin:0 0 12px;font-size:1.05rem;text-align:center}
.kin{width:100%;font-size:1.3rem;padding:12px;border-radius:16px;border:3px solid #F0B429;background:#fff;color:#17332F;text-align:center;margin:0 0 14px}
.kav{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:0 0 14px}
.kav button{font-size:2rem;width:60px;height:60px;border-radius:18px;border:3px solid transparent;background:rgba(255,255,255,.75);cursor:pointer}
.kav button.on{border-color:#F0B429;background:#fff}
.kbig{display:block;width:100%;min-height:58px;margin:12px 0 0;border-radius:20px;border:0;background:#0B7A6F;color:#fff;font:inherit;font-size:1.15rem;font-weight:800;cursor:pointer}
.kbig.alt{background:rgba(255,255,255,.8);color:#17332F;border:2px solid #0B7A6F}
.kmsg{margin:10px 0;padding:10px 12px;border-radius:14px;background:#FFE9A8;color:#4B3500;text-align:center;font-weight:700}
.kpick{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kpick button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 8px;border-radius:22px;border:3px solid #F0B429;background:#fff;color:#17332F;font:inherit;font-size:1.1rem;cursor:pointer}
.kpick span{font-size:2.6rem}
.khero{border-radius:24px;background:linear-gradient(135deg,#0B7A6F,#065A52);color:#fff;padding:16px;text-align:center;margin:0 0 14px}
.khero .kst b{display:block;font-size:3rem;line-height:1;color:#FFD866}
.khero p{margin:8px 0;font-size:1.15rem;font-weight:800}
.khero small{opacity:.9}
.kbar{height:12px;border-radius:99px;background:rgba(255,255,255,.25);overflow:hidden;margin:8px 0}
.kbar i{display:block;height:100%;background:#FFD866;border-radius:99px;transition:width .3s}
.ktasks{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
.kt1{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 6px;border-radius:20px;border:3px solid transparent;background:#fff;color:#17332F;font:inherit;cursor:pointer;min-height:112px;position:relative}
.kt1 .ke{font-size:2rem}.kt1 b{font-size:.95rem;line-height:1.25}.kt1 i{position:absolute;top:6px;right:10px;font-style:normal;font-size:1.3rem}
.kt1.on{border-color:#F0B429;background:#FFF3C4;animation:kpop .35s}
@keyframes kpop{0%{transform:scale(.92)}60%{transform:scale(1.06)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.kt1.on{animation:none}}
.kmenu{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
.kmenu button{display:flex;align-items:center;gap:10px;padding:14px;border-radius:18px;border:2px solid #0B7A6F;background:rgba(255,255,255,.85);color:#17332F;font:inherit;font-size:1.5rem;cursor:pointer;text-align:left}
.kmenu b{font-size:1rem}
.kfoot{display:flex;gap:10px;justify-content:space-between}.kfoot button{flex:1;min-height:46px;border-radius:14px;border:2px solid currentColor;background:transparent;color:inherit;font:inherit;cursor:pointer}
.kcard{background:#fff;color:#17332F;border-radius:20px;padding:14px;margin:0 0 12px;border-left:6px solid #F0B429}
.kk{display:block;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:#8A5A00;margin-bottom:6px}
.kar{font-size:1.9rem;line-height:1.9;text-align:center;font-family:"Amiri","Scheherazade New","Noto Naskh Arabic",serif}
.ktr{margin:6px 0;font-weight:700}.ken{margin:0 0 6px}.kcard small{color:#5C6F6B}
.kl{display:flex;gap:12px;align-items:flex-start}.kl p{margin:2px 0 0}
.kn{flex:none;width:36px;height:36px;border-radius:12px;background:#F0B429;color:#2A1F00;font-weight:900;display:grid;place-items:center}
.kh3{margin:18px 0 8px;font-size:1.2rem}
.kq{font-size:1.35rem;text-align:center;margin:8px 0 14px}
.kopts{display:grid;gap:10px}.kopts button{min-height:56px;border-radius:18px;border:3px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;font-size:1.1rem;font-weight:700;cursor:pointer}
.kopts button.good{background:#C9F2D9;border-color:#1E8E4E}.kopts button.bad{background:#FFD6D1;border-color:#C0392B}
.kweek{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;text-align:center}
.kweek div{background:#fff;color:#17332F;border-radius:14px;padding:8px 2px}.kweek b{display:block;font-size:1.3rem}.kweek small{color:#5C6F6B}
.kweek.mini{margin-top:8px}.kweek.mini div{background:#F3F6F5;padding:4px 0}.kweek.mini b{font-size:1rem}
.kact{display:flex;gap:8px;margin-top:10px}.kact button{flex:1;min-height:40px;border-radius:12px;border:2px solid #0B7A6F;background:transparent;color:#17332F;font:inherit;cursor:pointer}
.htile.kids{grid-column:1/-1}

#kidsOv{overscroll-behavior:contain;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#kidsOv *{-webkit-user-select:none;user-select:none}#kidsOv input{-webkit-user-select:text;user-select:text}
.kmsg{min-height:46px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
.kmsg.empty{visibility:hidden}
.kt1.on{animation:none}.kt1.on.pop{animation:kpop .35s}
body.nokids .htile.kids{display:none}

/* v30: iPhone - keep the close button below the status bar and always reachable */
#kidsOv{height:100vh;height:100dvh;-webkit-overflow-scrolling:touch}
#kidsOv .kw{padding-top:max(12px,env(safe-area-inset-top,0px))}
#kidsOv .kt{position:sticky;top:0;z-index:5;margin:0 -16px 10px;padding:max(10px,env(safe-area-inset-top,0px)) 16px 10px;background:#FFF6DA}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) #kidsOv .kt{background:#1E2B2A}}
:root[data-theme="dark"] #kidsOv .kt{background:#1E2B2A}
#kidsOv .kt .kb.kx{width:52px;height:52px;flex:none;font-size:1.5rem}

.kbook{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px 10px 10px;margin:0 0 14px;border-radius:18px;border:2px solid #E8932A;background:linear-gradient(135deg,#FFF6E3,#FFE7BE);color:#17332F;font:inherit;cursor:pointer;text-align:left}
.kbook img{border-radius:8px;box-shadow:0 2px 6px rgba(0,0,0,.25);flex:none;object-fit:cover}
.kbook span{flex:1;display:flex;flex-direction:column;gap:2px}.kbook b{font-size:1.05rem}.kbook small{color:#6B5326;font-size:.85rem}.kbook i{font-style:normal;font-size:1.8rem;color:#E8932A}
.kbk{text-align:center}.kbk img{max-width:60%;height:auto;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,.3);margin:4px 0 10px}
.kbk h3{margin:6px 0 8px;font-size:1.25rem}.kbk p{line-height:1.5;text-align:left}
.kbtn{display:block;margin:10px 0;padding:14px;border-radius:16px;border:2px solid #0B7A6F;background:#fff;color:#0B4F48;font-weight:700;text-decoration:none;font-size:1.05rem}
.kbtn.pri{background:#0B7A6F;color:#fff}
.kbk .kcr{font-size:.82rem;opacity:.85;margin-top:14px}

.kbook2{border-color:#2B8FB5;background:linear-gradient(135deg,#E6F6FD,#CDEBF8)}.kbook2 small{color:#235E75}.kbook2 i{color:#2B8FB5}
.kbk .kpv{display:block;margin:0 0 12px}.kbk .kpv img{max-width:100%;width:100%;height:auto;margin:0;border-radius:10px}

.kbook3{border-color:#8E5BB5;background:linear-gradient(135deg,#F5ECFB,#E6D5F5)}.kbook3 small{color:#5E3C7C}.kbook3 i{color:#8E5BB5}
.kpkt{border-left:6px solid;padding-left:10px;margin-top:22px}.kpks{margin:-4px 0 10px;opacity:.85}
.kpg{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 6px}
.kpc{background:#fff;border-radius:16px;padding:8px;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.15);display:flex;flex-direction:column;gap:6px;color:#17332F}
.kpc a{display:flex;align-items:center;justify-content:center;min-height:140px}.kpc img{width:100%;max-height:200px;object-fit:contain;border-radius:8px;background:#f3f3f3}
.kpc button{border:2px solid #E8932A;background:#FFF6E3;color:#6B4A0E;border-radius:12px;padding:8px;font:inherit;font-weight:700;cursor:pointer}
.kpc.on{outline:3px solid #F0B429}.kpc.on button{background:#F0B429;color:#3B2A00}.kpc small{opacity:.7}
.kspr{width:100%;margin:6px 0 12px;font:inherit;cursor:pointer}.kbtn.kg{text-align:left;font-size:.95rem}
.kpkh{margin-bottom:12px}

/* ---- play inside the app (kids-play.js) ---- */
.kgl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px}
.kgc{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 8px 12px;border-radius:20px;border:3px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;text-align:center;cursor:pointer;min-height:132px}
.kgc>span{font-size:2rem;line-height:1}.kgc b{font-size:1rem}.kgc small{font-size:.8rem;opacity:.75}
.kgc i{position:absolute;top:6px;right:10px;font-style:normal;font-size:.95rem}.kgc.on{background:#FFF3C4;border-color:#F0B429}
.kgm{padding-bottom:8px}.kgm canvas{display:block;width:100%;max-width:360px;margin:8px auto;border-radius:16px;border:3px solid #0B7A6F;touch-action:none;background:#FFFDF4}
.kar4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-width:360px;margin:0 auto 6px}
.kar4 button{min-height:52px;border-radius:14px;border:2px solid #0B7A6F;background:#fff;color:#0B4F48;font-size:1.3rem;cursor:pointer}
.kgw{margin:14px 0 0}.kgw p{margin:0}
.kjn{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kjn>div{display:flex;flex-direction:column;gap:8px}
.kjn button{min-height:64px;padding:8px;border-radius:14px;border:3px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;font-size:.92rem;cursor:pointer;line-height:1.2}
.kjn button small{display:block;opacity:.7;font-size:.75rem}.kjn button.sel{border-color:#F0B429;background:#FFF3C4}
.kjn button.ok{border-color:#1E8E4E;background:#C9F2D9;opacity:.85}
.kstory{font-size:1.08rem;line-height:1.5;margin:0 0 12px}
.kws{display:grid;gap:2px;max-width:380px;margin:8px auto;touch-action:none;user-select:none;-webkit-user-select:none}
.kws span{aspect-ratio:1;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:6px;font-weight:800;font-size:clamp(.8rem,4.2vw,1.15rem);color:#17332F}
.kws span.sel{background:#FFD866}.kws span.f{background:#8FD9B0}
.kwl{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:8px 0}
.kwl span{padding:4px 10px;border-radius:99px;background:#fff;color:#17332F;font-weight:700;font-size:.9rem}.kwl span.got{background:#1E8E4E;color:#fff;text-decoration:line-through}
.kgp{font-size:1.08rem;line-height:2.1;background:rgba(255,255,255,.7);color:#17332F;border-radius:18px;padding:12px 14px}
.kgb{min-width:84px;min-height:38px;margin:0 2px;border-radius:10px;border:2px dashed #0B7A6F;background:#fff;color:#0B4F48;font:inherit;font-weight:800;cursor:pointer}
.kgb.sel{border-style:solid;border-color:#F0B429;background:#FFF3C4}.kgb.ok{border-style:solid;border-color:#1E8E4E;background:#C9F2D9}
.kbank{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:12px 0}
.kbank button{min-height:44px;padding:6px 14px;border-radius:99px;border:2px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;font-weight:700;cursor:pointer}.kbank button:disabled{opacity:.3}
.khint{text-align:center;font-weight:700;margin:0 0 10px}
.kslots,.ktiles{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:10px 0}
.kslots span{width:42px;height:48px;border-bottom:4px solid #0B7A6F;display:flex;align-items:center;justify-content:center;font-size:1.5rem;font-weight:800}
.ktiles button{width:48px;height:52px;border-radius:12px;border:3px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;font-size:1.4rem;font-weight:800;cursor:pointer}.ktiles button:disabled{opacity:.25}
.kd30{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.kd30 button{min-height:44px;border-radius:12px;border:2px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;font-weight:700;cursor:pointer}.kd30 button.on{background:#FFF3C4;border-color:#F0B429}
.kh3 small{font-weight:600;opacity:.7;font-size:.8rem}
.kdays{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px}
.kday{position:relative;display:flex;align-items:center;gap:8px;text-align:left;padding:8px 10px;min-height:56px;border-radius:14px;border:2px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;cursor:pointer}
.kday b{flex:0 0 30px;height:30px;border-radius:50%;background:#0B7A6F;color:#fff;display:flex;align-items:center;justify-content:center;font-size:.9rem}
.kday small{font-size:.78rem;line-height:1.15}.kday i{position:absolute;top:2px;right:6px;font-style:normal;font-size:.8rem}.kday.on{background:#FFF3C4;border-color:#F0B429}
.kpimg{position:relative;display:flex;align-items:center;justify-content:center;min-height:140px;padding:0;border:0;background:none;cursor:pointer}
.kpimg em{position:absolute;top:2px;left:2px;font-style:normal;font-size:1rem}
.kpar{text-align:left;font-size:.95rem;margin-top:16px}
.kptb{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:4px 0 8px}
.kptb button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px;border-radius:12px;border:2px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;cursor:pointer}
.kptb button span{font-size:1.3rem;line-height:1}.kptb button small{font-size:.68rem;font-weight:700}.kptb button.on{background:#0B7A6F;border-color:#0B7A6F;color:#fff}
.kppal{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;margin:0 0 8px}
.kppal button{box-sizing:border-box;width:30px;height:30px;min-width:0;min-height:0;padding:0;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.3);cursor:pointer}.kppal button.on{box-shadow:0 0 0 3px #0B7A6F;transform:scale(1.15)}
.kpact{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 8px}
.kpact button,.kpnav button{min-height:44px;border-radius:12px;border:2px solid #0B7A6F;background:#fff;color:#0B4F48;font:inherit;font-weight:700;cursor:pointer}
.kpm{min-height:1.2em;margin:0 0 6px;text-align:center;font-size:.82rem;opacity:.8}
.kpwrap{overflow:auto;border-radius:12px;border:2px solid rgba(0,0,0,.15);background:#fff;-webkit-overflow-scrolling:touch}
.kpin{position:relative;width:100%;line-height:0}.kpin.z{width:220%}
.kpin img{width:100%;height:auto;display:block;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;pointer-events:none}
.kpin canvas{position:absolute;inset:0;width:100%;height:100%;mix-blend-mode:multiply;touch-action:none}.kpin canvas.mv{touch-action:auto}
.kpnav{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:8px;margin:10px 0}
.kpnav button:disabled{opacity:.35}.kpnav .kpd.on{background:#F0B429;border-color:#F0B429;color:#3B2A00}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .kgp,:root:not([data-theme="light"]) .kstory{color:#F2F7F5}}
:root[data-theme="dark"] .kgp,:root[data-theme="dark"] .kstory{color:#F2F7F5}

/* ---- v51 game types ---- */
.kcw{display:grid;gap:2px;max-width:420px;margin:8px auto;touch-action:manipulation}
.kcw i{aspect-ratio:1}
.kcl{position:relative;aspect-ratio:1;min-width:0;min-height:0;padding:0;border-radius:6px;border:2px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;font-weight:800;font-size:clamp(.8rem,4.5vw,1.2rem);cursor:pointer}
.kcl sup{position:absolute;top:0;left:2px;font-size:.5rem;font-weight:700;line-height:1;opacity:.75}
.kcl.hl{background:#DFF3EF}.kcl.sel{background:#FFD866;border-color:#F0B429}.kcl.ok{background:#C9F2D9}.kcl.bad{background:#FFC9C9}
.kcwk{display:grid;grid-template-columns:repeat(9,1fr);gap:4px;max-width:420px;margin:8px auto}
.kcwk button{min-width:0;min-height:40px;padding:0;border-radius:8px;border:2px solid #0B7A6F;background:#fff;color:#17332F;font:inherit;font-weight:800;cursor:pointer}
.kcwk .w2{grid-column:span 2}.kcwk .w3{grid-column:span 3;background:#0B7A6F;color:#fff}
.kcq{display:flex;flex-direction:column;gap:4px;margin:10px 0}.kcq b{margin-top:6px}
.kcq button{text-align:left;min-height:36px;padding:6px 10px;border-radius:10px;border:2px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;font-size:.9rem;cursor:pointer}
.kpk{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.kpk button{text-align:left;min-height:48px;padding:10px 14px;border-radius:14px;border:3px solid #7FB8B1;background:#fff;color:#17332F;font:inherit;font-size:1rem;cursor:pointer}
.kpk button.on{border-color:#F0B429;background:#FFF3C4}.kpk button.good{border-color:#1E8E4E;background:#C9F2D9}.kpk button.bad{border-color:#D33;background:#FFD6D6}
.ksc{min-height:120px;display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;border-radius:20px;background:#fff;color:#17332F;border:3px solid #0B7A6F;font-size:1.4rem;font-weight:800;margin:8px 0}
.ksb{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ksb button{min-height:64px;border-radius:16px;border:3px solid #0B7A6F;background:#fff;color:#0B4F48;font:inherit;font-weight:800;font-size:1rem;cursor:pointer}
.kod{margin:8px 0;padding-left:1.6em;line-height:1.9;font-weight:700}
.kwl2{display:block;margin:12px 0 4px;font-weight:700}
.kgm textarea{width:100%;box-sizing:border-box;padding:10px;border-radius:14px;border:3px solid #7FB8B1;font:inherit;font-size:1rem;background:#fff;color:#17332F}
.kcn{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;padding:14px;margin:8px 0;border-radius:20px;background:#fff;font-size:2.2rem;line-height:1.1}
.kcnb button{font-size:1.6rem;font-weight:800}
.kpnav.one{grid-template-columns:1fr}
#kdm:empty{display:none}
