/* Two playful activity studios within the shared Salam Games shell. */
*{box-sizing:border-box}
body{margin:0;font-family:Nunito,system-ui,sans-serif;color:#173653;background:#eaf8ff;background-image:radial-gradient(#fff 1.5px,transparent 1.5px);background-size:26px 26px}
.practice{max-width:1060px;margin:auto;padding:22px 20px 40px}
.practice [hidden]{display:none!important}
.practice h1,.practice h2,.practice p{margin:0}
.practice h1{font-size:clamp(1.9rem,4.5vw,3rem);letter-spacing:-.04em;line-height:1.12;color:#173653;font-weight:1000}
.practice h2{font-size:clamp(1.35rem,3vw,1.85rem);line-height:1.2}
.practice p{line-height:1.55}
.practice .eyebrow{color:#0369a1;font-size:.75rem;letter-spacing:.13em;text-transform:uppercase;font-weight:1000;margin-bottom:6px}
.practice-intro{display:flex;align-items:center;gap:16px;margin:0 0 22px}
.practice-intro>span{display:grid;place-items:center;flex:0 0 72px;height:72px;background:#fff;border:3px solid #c4b5fd;border-radius:24px;box-shadow:0 6px 0 #ddd6fe;font-size:38px;transform:rotate(-5deg)}
.practice-intro p:last-child{color:#486176;max-width:660px;margin-top:9px;font-weight:700}
.practice button,.practice a.practice-btn{font:900 .95rem/1.35 Nunito,system-ui,sans-serif;min-height:46px;border:2px solid #bfdef0;border-radius:15px;padding:11px 16px;cursor:pointer;color:#075985;background:white;touch-action:manipulation;user-select:none;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:transform .15s,background .15s;box-shadow:0 3px 0 #cee6f2}
@media(hover:hover) and (pointer:fine){.practice button:hover,.practice a.practice-btn:hover{background:#f0f9ff;transform:translateY(-1px)}}
.practice button:active{box-shadow:none}
.practice button:disabled{cursor:default;transform:none;box-shadow:none;opacity:.65}
.practice :focus-visible{outline:3px solid #7c3aed;outline-offset:4px}
.practice button.primary{background:#6d28d9;color:white;border-color:#5b21b6;box-shadow:0 4px 0 #4c1d95}
@media(hover:hover) and (pointer:fine){.practice button.primary:hover{background:#5b21b6}}
.practice-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.practice-note{font-size:.84rem;color:#486176;font-weight:700}
.practice-card{background:#fff;border:2px solid #d2e6f3;border-radius:26px;box-shadow:0 7px 0 #d1e7f3,0 16px 35px #17365309;overflow:hidden}
.practice-meter{height:10px;width:100%;border:0;border-radius:9px;overflow:hidden;accent-color:#059669;background:#e2e8f0}
.practice-meter::-webkit-progress-bar{background:#e2e8f0;border-radius:9px}
.practice-meter::-webkit-progress-value{background:#059669;border-radius:9px}
.practice-meter::-moz-progress-bar{background:#059669;border-radius:9px}
.trace-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:22px;align-items:start}
.trace-header{display:flex;align-items:center;gap:14px;padding:16px 22px;background:#ecfdf5;border-bottom:2px solid #a7f3d0}
.trace-letter{font:700 58px/1 Amiri,serif;color:#047857;min-width:45px;text-align:center}
.trace-header h2{font-size:1.3rem}.trace-header button{margin-left:auto}
.trace-header .trace-word{font-size:.9rem;color:#3f5f52;margin-top:5px;font-weight:800}
.trace-word [lang=ar]{font:22px/1.5 Amiri,serif}
.trace-paper{position:relative;background:linear-gradient(transparent 79px,#eaf3f8 80px,transparent 81px);background-size:100% 80px}
#traceCanvas{width:100%;height:auto;aspect-ratio:500/320;display:block;touch-action:none;cursor:crosshair}
.trace-toolbar{padding:14px 18px;border-top:2px solid #e2eef5;display:flex;flex-wrap:wrap;gap:9px;justify-content:space-between}
.trace-feedback{padding:15px 20px;background:#f5f3ff;border-top:1px solid #e4dafe;min-height:88px}
#traceStatus{font-weight:800;color:#4c1d95}
.trace-feedback[data-success=true]{background:#ecfdf5}.trace-feedback[data-success=true] #traceStatus{color:#065f46}
.trace-feedback .practice-note{margin-top:5px}
.trace-sidebar{padding:20px}.trace-sidebar h2{font-size:1.2rem;margin-bottom:6px}.trace-sidebar .practice-meter{margin:12px 0}
.letter-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0}
.practice .letter-pill{padding:0;height:48px;min-width:44px;font:700 26px/1 Amiri,serif;position:relative}
.practice .letter-pill.checked::after{content:'✓';position:absolute;right:1px;top:1px;border-radius:50%;font:900 10px Nunito;color:#065f46;background:#a7f3d0;width:14px;height:14px}
.practice .letter-pill[aria-current=true]{background:#6d28d9;color:#fff;border-color:#5b21b6}
.trace-help{margin-top:22px;padding:18px 22px}.trace-help summary{font-weight:900;min-height:44px;cursor:pointer;display:flex;align-items:center}.trace-help p{margin:10px 0}
.trace-shortcuts{display:flex;justify-content:space-between;gap:10px;margin-top:15px}.trace-shortcuts button{flex:1}
.practice .sound-note{font-size:.78rem;margin:8px 0 0;color:#486176;min-height:20px}
.story-welcome{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:26px;padding:24px}
.story-picture{aspect-ratio:1.12;position:relative;border-radius:20px;overflow:hidden;background:#bfe8ff}
.story-picture img{width:100%;height:100%;object-fit:cover;display:block}
.story-picture::after{content:'';position:absolute;inset:0;border:1px solid #0001;border-radius:20px;pointer-events:none}
.story-picture .story-seal{position:absolute;bottom:14px;left:14px;right:14px;background:#fffffff2;padding:12px 14px;border:2px solid #fff;border-radius:15px;font-weight:1000;color:#17445b}
.story-setup p{margin:12px 0}.story-setup fieldset{border:0;padding:0;margin:18px 0}.story-setup legend{font-weight:900;margin-bottom:10px}
.story-routes{display:flex;flex-wrap:wrap;gap:9px}.practice .story-routes button[aria-pressed=true]{border-color:#7c3aed;background:#f3e8ff;color:#5b21b6;box-shadow:0 3px 0 #c4b5fd}
.story-setup #startBtn{width:100%;margin-top:8px}
.story-play{max-width:800px;margin:auto}.story-map{display:flex;list-style:none;gap:8px;justify-content:center;margin:0 0 18px;padding:0}
.story-map li{display:grid;place-items:center;flex:1;max-width:110px;padding:9px 4px;border:2px solid #c8def0;border-radius:15px;background:#fff;font-size:.76rem;font-weight:900;color:#486176;position:relative}
.story-map .map-icon{font-size:24px;line-height:1.3}.story-map li[aria-current=step]{border-color:#7c3aed;background:#f3e8ff;color:#5b21b6}.story-map li.done{border-color:#6ee7b7;background:#ecfdf5;color:#065f46}
.story-stage{padding:24px;position:relative}.story-topline{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:16px}.story-tag{font-size:.78rem;font-weight:1000;background:#e0f2fe;color:#075985;padding:6px 11px;border-radius:99px}
.story-vignette{position:relative;min-height:138px;display:flex;justify-content:center;align-items:center;gap:18px;background:linear-gradient(#dcf4ff 70%,#bcebd4 70%);border:2px solid #c7e8f2;border-radius:20px;overflow:hidden;margin-bottom:20px}
.story-vignette::before{content:'';width:55px;height:55px;border-radius:50%;background:#ffe8a1;position:absolute;left:24px;top:16px;box-shadow:0 0 0 12px #fff6d580}
.story-prop{font-size:56px;position:relative;filter:drop-shadow(0 5px 0 #17365310);z-index:1;transform:rotate(-7deg)}
.story-prop:nth-child(2){font-size:74px;transform:rotate(7deg)}
.story-vignette.bloom .story-prop{animation:storyBloom .6s ease both}
@keyframes storyBloom{0%{transform:translateY(10px) scale(.8)}60%{transform:translateY(-7px) scale(1.06)}100%{transform:translateY(0) scale(1)}}
.story-situation{font-size:1.08rem;margin:12px 0 18px!important;font-weight:700}
.story-choices{display:grid;gap:11px}.practice .story-choice{justify-content:flex-start;text-align:left;min-height:58px;padding:13px 16px;font-weight:800;color:#173653}
.story-choice .choice-letter{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:10px;background:#e0f2fe;color:#075985;margin-right:3px}
.practice .story-choice.selected{border-color:#7c3aed;background:#f5f3ff;opacity:1}.practice .story-choice:disabled{opacity:.8}
.story-feedback{margin-top:18px;padding:18px;border:2px solid #c4b5fd;background:#f5f3ff;border-radius:20px}.story-feedback h3{margin:0 0 6px;font-size:1.1rem;color:#4c1d95}.story-feedback p{margin-bottom:12px}
.story-teaching{padding-top:12px;border-top:1px solid #d8c6f4;font-size:.9rem}.story-teaching small{display:block;font-size:.76rem;color:#486176;margin-top:4px}
.story-footer{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:18px;flex-wrap:wrap}.story-footer p{font-size:.8rem;font-weight:800}
.story-finish{text-align:center;padding:30px;max-width:720px;margin:auto}.story-finish h2{margin:12px 0}.story-finish .practice-actions{justify-content:center;margin:20px 0}.story-stamps{list-style:none;padding:0;margin:20px 0;display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.story-stamps li{background:#ecfdf5;border:2px solid #a7f3d0;border-radius:18px;padding:12px;font-weight:900;color:#065f46}
.story-takeaway{background:#fff7d6;padding:18px;border-radius:20px;margin:20px 0;text-align:left;border:2px solid #fde68a}.story-takeaway strong{display:block;margin-bottom:5px;color:#854d0e}
.practice-noscript{padding:18px;background:#fff7d6;border:2px solid #fde68a;border-radius:18px;margin-bottom:15px}
@media(max-width:760px){.practice{padding:18px 14px 28px}.trace-layout{grid-template-columns:1fr}.trace-sidebar{padding:18px}.letter-nav{grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.practice .letter-pill{min-width:0}.trace-sidebar .practice-note{max-width:580px}.story-welcome{grid-template-columns:1fr;padding:18px;gap:18px}.story-picture{aspect-ratio:2.3}.practice-intro{gap:12px}.practice-intro>span{flex-basis:55px;height:55px;font-size:30px;border-radius:18px}.story-stage{padding:18px}.story-finish{padding:22px}}
@media(max-width:380px){.practice{padding-left:12px;padding-right:12px}.practice-intro>span{display:none}.trace-header{padding:12px;gap:9px}.trace-header button{padding:9px;font-size:.85rem}.trace-letter{min-width:30px;font-size:45px}.trace-word [lang=ar]{display:block}.trace-toolbar{padding:12px;gap:7px}.trace-toolbar button{padding:10px 12px}.letter-nav{grid-template-columns:repeat(5,minmax(0,1fr))}.story-stage{padding:15px}.story-vignette{min-height:116px}.story-prop{font-size:44px}.story-prop:nth-child(2){font-size:60px}.story-map{gap:5px}.story-map li{font-size:.67rem}.story-map .map-icon{font-size:22px}}
@media(prefers-reduced-motion:reduce){.practice *{animation:none!important;transition:none!important}}
html[data-sg-calm=true] .practice *{animation:none!important;transition:none!important}
