:root{--bg: #fdf8f0;--surface: #ffffff;--ink: #23303b;--muted: #5d6b78;--line: #e4ddd0;--brand: #2f6f73;--brand-ink: #ffffff;--accent: #f4c430;--good: #2e8b57;--soft: #eef6f6;--warn-bg: #fff6e0;--warn-ink: #7a5600;--danger: #b3402f;--radius: 18px;--shadow: 0 2px 0 rgba(0, 0, 0, .06), 0 6px 18px rgba(35, 48, 59, .08);--font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Naskh Arabic", Tahoma, sans-serif;color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--ink);font-family:var(--font);-webkit-tap-highlight-color:transparent;overscroll-behavior:none}button{font:inherit;color:inherit}img{-webkit-user-drag:none;-webkit-user-select:none;user-select:none}:focus-visible{outline:4px solid var(--accent);outline-offset:3px}.child{direction:ltr;height:100dvh;display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:manipulation}.child-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:max(10px,env(safe-area-inset-top)) 16px 6px;min-height:76px}.child-main{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:6px 16px max(16px,env(safe-area-inset-bottom))}.icon-btn{width:64px;height:64px;border-radius:50%;border:none;background:var(--surface);box-shadow:var(--shadow);display:inline-grid;place-items:center;cursor:pointer;flex:none}.icon-btn svg{width:34px;height:34px}.icon-btn.big{width:96px;height:96px}.icon-btn.big svg{width:50px;height:50px}.icon-btn.brand{background:var(--brand);color:var(--brand-ink)}.icon-btn[aria-pressed=true]{background:var(--accent)}.listening .icon-btn.replay{animation:pulse 1.2s ease-in-out infinite}.progress-dots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;max-width:60vw}.progress-dots i{width:10px;height:10px;border-radius:50%;background:#d8d1c3;display:block}.progress-dots i.done{background:var(--brand)}.activity-body{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;container-type:size}.grid-wrap{width:100%;height:100%;display:grid;place-items:center}.grid{display:grid;gap:var(--gap, 12px);grid-template-columns:repeat(var(--cols),1fr);width:min(100cqw,calc((100cqh - var(--gap, 12px)) * var(--cols) / var(--rows)))}.grid.locked{filter:saturate(.9);opacity:.92}.tile{aspect-ratio:1;border:4px solid transparent;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);padding:4px;cursor:pointer;position:relative;overflow:hidden;display:grid;place-items:center;transition:transform .12s ease}.tile img{width:100%;height:100%;object-fit:contain;border-radius:12px;pointer-events:none}.tile:active{transform:scale(.97)}.tile.correct{border-color:var(--good);animation:bounce .6s ease}.tile.wiggle{animation:wiggle .45s ease}.tile .demo-hand{position:absolute;right:8%;bottom:4%;width:42%;animation:tap 1.2s ease-in-out infinite}.word-label{position:absolute;left:0;right:0;bottom:4px;text-align:center;font-weight:700;font-size:clamp(14px,2.4vw,22px);background:#ffffffd9}.big-picture{width:min(70vw,55dvh);aspect-ratio:1;border-radius:28px;background:var(--surface);box-shadow:var(--shadow);border:none;padding:10px;cursor:pointer}.big-picture img{width:100%;height:100%;object-fit:contain}.stack{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%}.row{display:flex;gap:18px;align-items:center;justify-content:center;flex-wrap:wrap}.choice-btn{width:clamp(110px,26vw,170px);height:clamp(110px,26vw,170px);border-radius:28px;border:4px solid transparent;background:var(--surface);box-shadow:var(--shadow);cursor:pointer;display:grid;place-items:center}.choice-btn svg{width:70%;height:70%}.choice-btn.correct{border-color:var(--good);animation:bounce .6s ease}.choice-btn.wiggle{animation:wiggle .45s ease}.scene{position:relative;aspect-ratio:1;width:100%;background:#f7f3ea;border-radius:16px;overflow:hidden}.scene img{position:absolute;object-fit:contain}.scene-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;width:min(100cqw,calc(100cqh - 14px))}.scene-grid .tile{padding:6px}.slots{display:flex;gap:10px;justify-content:center;min-height:110px;flex-wrap:wrap}.slot{width:clamp(84px,20vw,120px);height:clamp(84px,20vw,120px);border-radius:18px;border:3px dashed #c9bfae;display:grid;place-items:center;background:#ffffff80}.tile-chip{width:clamp(84px,20vw,120px);height:clamp(84px,20vw,120px);border-radius:18px;border:none;background:var(--surface);box-shadow:var(--shadow);cursor:pointer;display:grid;place-items:center;padding:6px;position:relative}.tile-chip img,.tile-chip svg{width:88%;height:88%;object-fit:contain}.tile-chip .chip-word{position:absolute;bottom:2px;font-size:14px;font-weight:700}.scene-small{width:min(46vw,30dvh)}.picker{display:flex;flex-wrap:wrap;gap:24px;justify-content:center}.avatar-btn{border:none;background:var(--surface);box-shadow:var(--shadow);border-radius:28px;padding:14px;cursor:pointer;display:grid;justify-items:center;gap:6px;min-width:150px}.avatar-btn svg{width:110px;height:110px}.avatar-btn span{font-size:20px;font-weight:700}.words-book{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px;width:100%;max-height:100%;overflow:auto;padding:8px}.end-card{text-align:center}.end-card .sticker{font-size:0;width:160px;height:160px;margin:0 auto;animation:bounce 1s ease}@keyframes bounce{0%,to{transform:scale(1)}40%{transform:scale(1.06)}70%{transform:scale(.98)}}@keyframes wiggle{0%,to{transform:translate(0)}25%{transform:translate(-6px)}75%{transform:translate(6px)}}@keyframes pulse{0%,to{box-shadow:var(--shadow)}50%{box-shadow:0 0 0 8px #f4c43073}}@keyframes tap{0%,to{transform:translate(0)}50%{transform:translate(-8%,-8%)}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation:none!important;transition:none!important}}.parent{direction:rtl;min-height:100dvh;padding:16px;max-width:1100px;margin:0 auto;font-size:16px;line-height:1.6}.parent h1{font-size:24px;margin:8px 0 12px}.parent h2{font-size:19px;margin:18px 0 8px}.parent h3{font-size:16px;margin:12px 0 6px}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;margin-bottom:14px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.stat{background:var(--soft);border-radius:14px;padding:12px}.stat b{display:block;font-size:26px}.stat small{color:var(--muted);display:block}.stat b small{font-size:13px;font-weight:400;margin-top:2px}input[type=file]{font:inherit;font-size:14px;display:block;width:100%;min-height:44px;padding:8px;border:1px dashed var(--line);border-radius:10px;background:#fff;margin-bottom:10px}input[type=file]::file-selector-button{font:inherit;padding:8px 14px;margin-inline-end:10px;border:none;border-radius:999px;background:var(--soft);color:inherit;cursor:pointer}.title-icon{width:64px;height:64px;display:inline-grid;place-items:center;flex:none}.title-icon svg{width:40px;height:40px}.btn{border:none;border-radius:12px;padding:10px 16px;min-height:44px;background:var(--brand);color:var(--brand-ink);cursor:pointer;font-weight:600}.btn.secondary{background:#e9eef0;color:var(--ink)}.btn.danger{background:var(--danger)}.btn:disabled{opacity:.5;cursor:not-allowed}.field{display:grid;gap:4px;margin-bottom:12px}.field input,.field select{font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:10px;min-height:44px;background:#fff}.check{display:flex;gap:10px;align-items:flex-start;margin:8px 0}.check input{width:22px;height:22px;margin-top:3px;flex:none}.notice{background:var(--warn-bg);color:var(--warn-ink);border-radius:12px;padding:10px 12px;margin:10px 0}.muted{color:var(--muted)}.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;min-height:40px;cursor:pointer}.tabs button[aria-selected=true]{background:var(--brand);color:#fff;border-color:var(--brand)}table.t{width:100%;border-collapse:collapse}table.t th,table.t td{padding:8px 6px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}.badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:13px;background:#eee;white-space:nowrap}.badge.introduced{background:#eef0f3}.badge.practising{background:#fff1c9}.badge.secure{background:#d9f0ff}.badge.mastered{background:#d7f5df}.badge.retained{background:#bfeccc;font-weight:700}.word-chip{display:inline-flex;align-items:center;gap:6px;margin:3px;padding:4px 8px;border:1px solid var(--line);border-radius:12px;background:#fff}.word-chip img{width:28px;height:28px}.bar{height:10px;background:#ece6da;border-radius:99px;overflow:hidden}.bar>i{display:block;height:100%;background:var(--brand)}.spark{display:flex;align-items:flex-end;gap:3px;height:60px}.spark i{flex:1;background:var(--brand);border-radius:3px 3px 0 0;min-height:2px}.parent-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.pin-pad{display:grid;grid-template-columns:repeat(3,72px);gap:10px;justify-content:center;direction:ltr}.pin-pad button{height:64px;border-radius:16px;border:none;background:#fff;box-shadow:var(--shadow);font-size:24px;cursor:pointer}.pin-dots{display:flex;gap:10px;justify-content:center;margin:12px 0;direction:ltr}.pin-dots i{width:16px;height:16px;border-radius:50%;border:2px solid var(--brand)}.pin-dots i.on{background:var(--brand)}.hold-ring{position:relative}.hold-ring svg.ring{position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;width:calc(100% + 12px);height:calc(100% + 12px);pointer-events:none}
