Parental implications of developmental stages of play I want to do seminar I’m developmental pediatrician

Asking for Preferences

What format do you need for the seminar? · Who is the audience? · What depth/scope?

Reading File
Finding Sources
Searching PubMed

play development children parental role

Finding Sources
Finding Sources
Searching PubMed

play pediatric development cognitive social emotional benefits

Good - I found the Kaplan & Sadock section on play stages. Let me read that and search for more relevant content simultaneously.
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Searching PubMed

play-based learning early childhood brain development

I now have solid textbook content. Let me read the PPTX skill and start building the presentation.
Reading File
Finding Sources
Reading File
Now let me build the full PPTX:
Running Command

mkdir -p /tmp/workspace/play-seminar && ls /tmp/workspace/play-seminar/

Writing File

~/play-seminar/build_pptx.py


from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO

# ── Palette ────────────────────────────────────────────────────────────────────
TEAL        = RGBColor(0x00, 0x7A, 0x87)   # header / accent
TEAL_LIGHT  = RGBColor(0xE0, 0xF4, 0xF6)   # slide background tint
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK        = RGBColor(0x1A, 0x1A, 0x2E)
ORANGE      = RGBColor(0xFF, 0x6F, 0x00)   # highlight / age badge
GRAY_BG     = RGBColor(0xF4, 0xF7, 0xF9)
GRAY_TEXT   = RGBColor(0x55, 0x55, 0x66)
GREEN       = RGBColor(0x2E, 0x7D, 0x32)

W = Inches(13.333)
H = Inches(7.5)

prs = Presentation()
prs.slide_width  = W
prs.slide_height = H
blank = prs.slide_layouts[6]

# ── Helpers ────────────────────────────────────────────────────────────────────

def bg(slide, color):
    """Fill slide background."""
    fill = slide.background.fill
    fill.solid()
    fill.fore_color.rgb = color

def rect(slide, l, t, w, h, color, radius=False):
    shape = slide.shapes.add_shape(
        1,  # MSO_SHAPE_TYPE.RECTANGLE
        Inches(l), Inches(t), Inches(w), Inches(h)
    )
    shape.fill.solid()
    shape.fill.fore_color.rgb = color
    shape.line.fill.background()
    return shape

def textbox(slide, l, t, w, h, text, size, bold=False, color=None,
            align=PP_ALIGN.LEFT, wrap=True, italic=False):
    tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left  = Pt(2)
    tf.margin_right = Pt(2)
    tf.margin_top   = Pt(2)
    tf.margin_bottom= Pt(2)
    for i, line in enumerate(text.split('\n')):
        if i == 0:
            p = tf.paragraphs[0]
        else:
            p = tf.add_paragraph()
        p.alignment = align
        run = p.add_run()
        run.text = line
        run.font.size  = Pt(size)
        run.font.bold  = bold
        run.font.italic= italic
        if color:
            run.font.color.rgb = color

def header_bar(slide, title, subtitle=None):
    """Teal top bar with white title."""
    rect(slide, 0, 0, 13.333, 1.15, TEAL)
    textbox(slide, 0.3, 0.05, 12.7, 0.7, title, 30, bold=True,
            color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        textbox(slide, 0.3, 0.72, 12.7, 0.4, subtitle, 14, bold=False,
                color=RGBColor(0xCC, 0xEE, 0xF2), align=PP_ALIGN.LEFT)

def bullet_box(slide, l, t, w, h, items, title=None,
               bg_color=GRAY_BG, title_color=TEAL, text_color=DARK,
               font_size=15, title_size=17):
    rect(slide, l, t, w, h, bg_color)
    y_off = t + 0.12
    if title:
        textbox(slide, l+0.15, y_off, w-0.25, 0.42, title, title_size,
                bold=True, color=title_color)
        y_off += 0.42
    for item in items:
        textbox(slide, l+0.25, y_off, w-0.35, 0.4,
                "● " + item, font_size, color=text_color)
        y_off += 0.42

def age_badge(slide, l, t, label):
    rect(slide, l, t, 2.0, 0.45, ORANGE)
    textbox(slide, l, t, 2.0, 0.45, label, 14, bold=True,
            color=WHITE, align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 — TITLE SLIDE
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, TEAL)
rect(s, 0, 0, 13.333, 7.5, TEAL)  # solid bg

# White card in centre
rect(s, 1.2, 1.3, 10.9, 4.8, WHITE)

textbox(s, 1.4, 1.55, 10.5, 1.0,
        "Developmental Stages of Play", 36, bold=True, color=TEAL,
        align=PP_ALIGN.CENTER)
textbox(s, 1.4, 2.55, 10.5, 0.6,
        "Parental Implications & Clinical Practice", 24, bold=False,
        color=DARK, align=PP_ALIGN.CENTER, italic=True)

# Divider
rect(s, 3.5, 3.25, 6.3, 0.06, ORANGE)

textbox(s, 1.4, 3.45, 10.5, 0.45,
        "A Seminar for Parents and Clinicians", 17,
        color=GRAY_TEXT, align=PP_ALIGN.CENTER)
textbox(s, 1.4, 3.95, 10.5, 0.45,
        "Presented by a Developmental Pediatrician", 16,
        color=GRAY_TEXT, align=PP_ALIGN.CENTER)
textbox(s, 1.4, 4.5, 10.5, 0.45,
        "July 2026", 14, color=GRAY_TEXT, align=PP_ALIGN.CENTER, italic=True)

# Bottom strip
rect(s, 0, 6.8, 13.333, 0.7, ORANGE)
textbox(s, 0, 6.83, 13.333, 0.45,
        "Play is not just fun — it is the work of childhood.",
        15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 — LEARNING OBJECTIVES
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Learning Objectives",
           "By the end of this seminar, participants will be able to:")

objectives = [
    "Describe the developmental stages of play from birth to school age",
    "Explain how each stage links to cognitive, social, and emotional milestones",
    "Identify parental behaviors that support (or hinder) play development",
    "Recognise red flags that may signal developmental delay",
    "Apply play-based guidance in clinical consultations and parent education",
]
for i, obj in enumerate(objectives):
    y = 1.3 + i * 1.05
    rect(s, 0.5, y, 12.3, 0.85, TEAL_LIGHT)
    # number circle
    rect(s, 0.55, y+0.05, 0.5, 0.5, TEAL)
    textbox(s, 0.55, y+0.05, 0.5, 0.5, str(i+1), 17, bold=True,
            color=WHITE, align=PP_ALIGN.CENTER)
    textbox(s, 1.2, y+0.1, 11.3, 0.65, obj, 17, color=DARK)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 — WHY PLAY MATTERS
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Why Play Matters",
           "Play is the primary vehicle for child learning and development")

domains = [
    ("🧠 Cognitive", ["Problem-solving & reasoning", "Language acquisition", "Executive function", "Attention & memory"]),
    ("❤️ Emotional", ["Emotional regulation", "Self-esteem & confidence", "Resilience", "Coping with anxiety"]),
    ("🤝 Social", ["Turn-taking & sharing", "Empathy & perspective-taking", "Conflict resolution", "Peer relationships"]),
    ("💪 Physical", ["Gross & fine motor skills", "Sensory integration", "Body awareness", "Hand-eye coordination"]),
]

cols = [(0.3, TEAL), (3.6, GREEN), (6.9, ORANGE), (10.2, RGBColor(0x55, 0x33, 0x99))]
for (domain_title, items), (x_pos, col) in zip(domains, cols):
    rect(s, x_pos, 1.3, 2.95, 5.6, GRAY_BG)
    rect(s, x_pos, 1.3, 2.95, 0.55, col)
    textbox(s, x_pos+0.1, 1.32, 2.75, 0.5, domain_title, 16,
            bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    for i, item in enumerate(items):
        textbox(s, x_pos+0.15, 1.98+i*0.82, 2.65, 0.6,
                "▸ " + item, 13, color=DARK)

# Source note
textbox(s, 0.3, 7.1, 12.0, 0.35,
        "Sources: Kaplan & Sadock's Synopsis of Psychiatry; AAP 2018 Play Policy Statement",
        10, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 — OVERVIEW TABLE of STAGES
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Developmental Stages of Play: Overview",
           "Age-by-age progression — all ages are approximate")

headers = ["Stage", "Age", "Key Features", "Cognitive Link"]
col_w   = [2.2, 1.6, 5.5, 3.7]
col_x   = [0.25, 2.5, 4.15, 9.7]

# Header row
for txt, cx, cw in zip(headers, col_x, col_w):
    rect(s, cx, 1.25, cw-0.05, 0.5, TEAL)
    textbox(s, cx+0.05, 1.28, cw-0.1, 0.44, txt, 15,
            bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rows = [
    ("Sensorimotor",  "0–12 mo",
     "Mouthing, banging, dropping, exploring object properties",
     "Piaget Stage 1 — learning through senses & movement"),
    ("Functional",    "12–18 mo",
     "Uses objects per function: comb to hair, phone to ear",
     "Object permanence; cause-and-effect understanding"),
    ("Parallel",      "18mo–3 yr",
     "Plays alongside (not with) other children; no interaction",
     "Early symbolic capacity; egocentrism prominent"),
    ("Early Symbolic","18mo–3 yr",
     "Pretend with own body; uses one object to represent another",
     "Pre-operational thought; emerging language"),
    ("Complex Symbolic","30 mo+",
     "Dramatic sequences; imaginary objects; assigns roles to others",
     "Advanced symbolic thought; theory of mind beginning"),
    ("Cooperative",   "4–6 yr",
     "Group games with rules, shared goals, negotiation",
     "Concrete operational thought; moral reasoning emerges"),
]

row_colors = [GRAY_BG, WHITE, GRAY_BG, WHITE, GRAY_BG, WHITE]
for i, (stage, age, features, cog) in enumerate(rows):
    y = 1.85 + i * 0.85
    rc = row_colors[i]
    for cx, cw in zip(col_x, col_w):
        rect(s, cx, y, cw-0.05, 0.78, rc)
    textbox(s, col_x[0]+0.05, y+0.05, col_w[0]-0.1, 0.68, stage, 13, bold=True, color=TEAL)
    textbox(s, col_x[1]+0.05, y+0.05, col_w[1]-0.1, 0.68, age, 13, bold=True, color=ORANGE)
    textbox(s, col_x[2]+0.05, y+0.05, col_w[2]-0.1, 0.68, features, 12, color=DARK)
    textbox(s, col_x[3]+0.05, y+0.05, col_w[3]-0.1, 0.68, cog, 12, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 — SENSORIMOTOR PLAY (0–12 months)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Stage 1: Sensorimotor Play",
           "Birth to 12 months — Learning through the body")

age_badge(s, 0.3, 1.3, "0 – 12 months")

# What it looks like
bullet_box(s, 0.3, 1.88, 6.0, 2.9,
    ["Mouthing, banging, shaking, dropping toys",
     "Exploring moving parts — poking, pulling",
     "Peek-a-boo; sound imitation games with caregiver",
     "Social smile (6 wks); laughter (4 mo); object permanence (8–12 mo)",
     "Solitary or with familiar caregiver"],
    title="What Play Looks Like", bg_color=TEAL_LIGHT)

# Parental implications
bullet_box(s, 6.55, 1.88, 6.5, 2.9,
    ["Respond promptly to vocalisations — builds secure attachment",
     "Floor time: supervised tummy time from Day 1",
     "Offer rattles, soft toys with textures, mirrors",
     "Talk, sing, narrate your actions — language wiring begins NOW",
     "Limit screens entirely (< 18 months per AAP guidelines)"],
    title="Parental Implications", bg_color=RGBColor(0xFF, 0xF3, 0xE0))

# Red flags
rect(s, 0.3, 4.95, 12.75, 0.75, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 0.4, 5.0, 12.5, 0.65,
        "🚩 Red Flags: No social smile by 3 months | No babbling by 12 months | Not reaching for objects | "
        "No interest in faces | No response to name by 9 months",
        13, color=RGBColor(0xB7, 0x1C, 0x1C))

textbox(s, 0.3, 5.82, 12.5, 0.45,
        "Key developmental link: Sensorimotor play is the foundation of Piaget's Stage 1 — all learning"
        " flows from sensory experience and motor action.",
        12, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 — FUNCTIONAL PLAY (12–18 months)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Stage 2: Functional Play",
           "12 to 18 months — Objects used for their purpose")

age_badge(s, 0.3, 1.3, "12 – 18 months")

bullet_box(s, 0.3, 1.88, 6.0, 3.1,
    ["Pushes toy car, touches comb to hair, holds phone to ear",
     "Stacks blocks, bangs drums with intent",
     "Begins imitating household actions (sweeping, stirring)",
     "10–12 words by 12 months",
     "Points to share interest (proto-declarative pointing)"],
    title="What Play Looks Like", bg_color=TEAL_LIGHT)

bullet_box(s, 6.55, 1.88, 6.5, 3.1,
    ["Name objects during play: 'That's a cup — we drink from it!'",
     "Allow safe exploration — child-proof rather than restrict",
     "Follow the child's lead (child-directed play)",
     "Read board books together daily",
     "Encourage imitation games — clapping, waving",
     "Avoid over-directing; let the child problem-solve"],
    title="Parental Implications", bg_color=RGBColor(0xFF, 0xF3, 0xE0))

rect(s, 0.3, 5.15, 12.75, 0.65, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 0.4, 5.2, 12.5, 0.55,
        "🚩 Red Flags: No single words by 16 months | Not imitating actions | No pointing by 14 months | "
        "No functional use of objects",
        13, color=RGBColor(0xB7, 0x1C, 0x1C))

textbox(s, 0.3, 5.95, 12.5, 0.45,
        "Key developmental link: Functional play signals object permanence and early understanding of cause-effect."
        " It is a precursor to symbolic representation.",
        12, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 — PARALLEL PLAY & EARLY SYMBOLIC (18 months – 3 years)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Stages 3 & 4: Parallel Play and Early Symbolic Play",
           "18 months to 3 years — Side by side, and into the imagination")

age_badge(s, 0.3, 1.3, "18 mo – 3 years")

# Left: parallel play
bullet_box(s, 0.3, 1.88, 6.1, 2.55,
    ["Plays alongside another child — no real interaction",
     "Both children may use same toys without sharing",
     "Begins to notice and mimic peers",
     "Associative play emerges by age 3 (same toys, mild interaction)"],
    title="Parallel Play", bg_color=TEAL_LIGHT)

# Right: early symbolic
bullet_box(s, 6.55, 1.88, 6.5, 2.55,
    ["Pretends to eat / sleep using own body",
     "'Feeds' doll or mother — other as agent",
     "Block becomes a car — object substitution",
     "Sequences activities: 'cook then eat'"],
    title="Early Symbolic Play", bg_color=RGBColor(0xE8, 0xF5, 0xE9))

# Parental implications spanning full width
rect(s, 0.3, 4.6, 12.75, 1.8, RGBColor(0xFF, 0xF3, 0xE0))
textbox(s, 0.4, 4.65, 12.5, 0.4, "Parental Implications", 16, bold=True, color=ORANGE)
lines = [
    "● Arrange play dates — parallel play is developmentally normal; do not force sharing before age 3–4",
    "● Supply open-ended toys: blocks, dolls, play kitchen, soft animals",
    "● Join in pretend play — take a cup of 'tea'; narrate what the child does",
    "● Limit screen time; 18–24 month-olds learn language better from people than screens",
    "● Use play to prepare for transitions: 'let's pretend we're going to the doctor' before appointments",
]
for i, line in enumerate(lines):
    textbox(s, 0.45, 5.1 + i*0.32, 12.3, 0.3, line, 13, color=DARK)

rect(s, 0.3, 6.52, 12.75, 0.65, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 0.4, 6.55, 12.5, 0.55,
        "🚩 Red Flags: No pretend play by 18 months | No two-word phrases by 24 months | "
        "No interest in other children | Stereotyped/repetitive play only",
        13, color=RGBColor(0xB7, 0x1C, 0x1C))


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 — COMPLEX SYMBOLIC / DRAMATIC PLAY (30 months – 5 years)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Stage 5: Complex Symbolic & Dramatic Play",
           "30 months to 5 years — Scripts, roles, and narrative")

age_badge(s, 0.3, 1.3, "30 mo – 5 years")

bullet_box(s, 0.3, 1.88, 5.9, 3.2,
    ["Plans and acts out dramatic play sequences",
     "Uses imaginary objects (invisible tea, pretend fire)",
     "Assigns roles to others: 'You be the patient'",
     "Develops narrative arcs: beginning-middle-end",
     "Imaginary companions common (up to 50% of children, 3–10 yr)",
     "Drawings add arms, legs, torso progressively"],
    title="What Play Looks Like", bg_color=TEAL_LIGHT)

bullet_box(s, 6.45, 1.88, 6.6, 3.2,
    ["Participate without taking over — be a supporting character",
     "Ask open questions: 'What happens next in your story?'",
     "Accept and encourage imaginary companions — developmentally healthy",
     "Provide dress-up clothes, puppets, art materials",
     "Use play to process fears and transitions",
     "Read narrative picture books — expands play vocabulary",
     "Co-view and discuss TV — if any screen time at all"],
    title="Parental Implications", bg_color=RGBColor(0xFF, 0xF3, 0xE0))

rect(s, 0.3, 5.25, 12.75, 0.65, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 0.4, 5.3, 12.5, 0.55,
        "🚩 Red Flags: No complex pretend by 36 months | Cannot take on another's role | "
        "Cannot sequence 3-step play scenarios | Persistent solitary rigid play",
        13, color=RGBColor(0xB7, 0x1C, 0x1C))

textbox(s, 0.3, 6.05, 12.5, 0.9,
        "Clinical note: By age 2.5–3, doll/animal play reveals themes of family life — nurturance, "
        "discipline, sibling dynamics, even experiences of abuse. Kaplan & Sadock caution examiners to view "
        "play as a possible combination of re-enactment, fears, and fantasy — not literal disclosure.",
        12, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 9 — COOPERATIVE / RULE-BASED PLAY (School Age)
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Stage 6: Cooperative & Rule-Based Play",
           "4 to 8 years — Games with rules, teams, and moral reasoning")

age_badge(s, 0.3, 1.3, "4 – 8 years")

bullet_box(s, 0.3, 1.88, 5.9, 3.35,
    ["Group games with rules and shared goals",
     "Competitive play; winning and losing matter",
     "Complex two-against-one social dynamics",
     "Rivalries, secrets, alliances form",
     "Board games, sports, structured playground games",
     "Play reflects Piaget's concrete operational stage",
     "Moral sense of 'right/wrong' — rules seen as absolute"],
    title="What Play Looks Like", bg_color=TEAL_LIGHT)

bullet_box(s, 6.45, 1.88, 6.6, 3.35,
    ["Teach sportsmanship: how to win graciously AND lose",
     "Allow unstructured outdoor play — critical for executive function",
     "Do not over-schedule with structured activities",
     "Monitor peer relationships — bullying and exclusion emerge here",
     "Encourage mixed-age play when possible",
     "Recess is non-negotiable — AAP 2026 policy statement reaffirmed",
     "Limit competitive gaming before child can regulate frustration"],
    title="Parental Implications", bg_color=RGBColor(0xFF, 0xF3, 0xE0))

rect(s, 0.3, 5.38, 12.75, 0.65, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 0.4, 5.42, 12.5, 0.55,
        "🚩 Red Flags: Cannot follow rules of simple games by age 5 | "
        "Severe difficulty with peer relationships | Rigid need for sameness in play | "
        "Aggression that escalates beyond play context",
        13, color=RGBColor(0xB7, 0x1C, 0x1C))

textbox(s, 0.3, 6.12, 12.5, 0.45,
        "Evidence: AAP 2026 'Crucial Role of Recess' policy statement (Pediatrics, PMID 42107976) "
        "reaffirms that recess improves attention, social-emotional learning, and academic outcomes.",
        12, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 10 — PARENTAL ROLES ACROSS STAGES
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "The Parent's Role Across All Stages",
           "From partner to facilitator — the parental role evolves with the child")

roles = [
    ("PLAYMATE\n(0–18 mo)", TEAL,
     ["Be present and responsive", "Respond to every coo and gesture",
      "Imitate the child", "Narrate play aloud"]),
    ("CO-PLAYER\n(18 mo–4 yr)", GREEN,
     ["Join dramatic play as a character", "Follow child's lead", 
      "Expand play without taking over", "Name emotions in play"]),
    ("STAGE MANAGER\n(3–6 yr)", ORANGE,
     ["Provide props and time", "Set safe boundaries",
      "Stay available but step back", "Encourage peer play"]),
    ("FACILITATOR\n(6 yr+)", RGBColor(0x55, 0x33, 0x99),
     ["Ensure unstructured time", "Resist over-scheduling",
      "Model sportsmanship", "Advocate for recess at school"]),
]

for i, (title, col, pts) in enumerate(roles):
    x = 0.3 + i * 3.25
    rect(s, x, 1.3, 3.1, 5.6, GRAY_BG)
    rect(s, x, 1.3, 3.1, 0.8, col)
    textbox(s, x+0.05, 1.33, 3.0, 0.74, title, 14, bold=True,
            color=WHITE, align=PP_ALIGN.CENTER)
    for j, pt in enumerate(pts):
        textbox(s, x+0.15, 2.22 + j*0.9, 2.8, 0.8,
                "▸ " + pt, 13, color=DARK)

textbox(s, 0.3, 7.05, 12.75, 0.38,
        "Source: Kaplan & Sadock's Synopsis of Psychiatry, 12th ed.; "
        "Schneider et al. 2022 (PMID 35586226) — parent-child play and externalizing/internalizing behavior problems.",
        10, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 11 — PLAY AND ATTACHMENT
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Play and Attachment: The Foundation",
           "Secure attachment enables richer, more exploratory play")

# Attachment triangle
rect(s, 0.3, 1.3, 8.0, 5.5, TEAL_LIGHT)
textbox(s, 0.45, 1.38, 7.7, 0.45, "The Secure Base → Play Exploration Loop", 17, bold=True, color=TEAL)

attach_points = [
    ("Secure attachment (sensitive caregiving)", 
     "Child explores freely, returns to caregiver as safe base"),
    ("Attuned play interactions",
     "Builds emotional regulation and stress-response systems"),
    ("Responsive caregiving during play",
     "Scaffolds language, problem-solving, and self-confidence"),
    ("Physical play (rough-housing, tickling)",
     "Regulates arousal; builds body awareness and emotional tolerance"),
    ("Reading and joint attention during play",
     "Strongest predictor of early vocabulary and literacy"),
]
for i, (cause, effect) in enumerate(attach_points):
    y = 1.95 + i * 0.9
    rect(s, 0.4, y, 3.8, 0.75, TEAL)
    textbox(s, 0.48, y+0.06, 3.7, 0.65, cause, 12, bold=True, color=WHITE)
    textbox(s, 4.35, y+0.1, 3.7, 0.65, "→  " + effect, 12, color=DARK)

# Right panel: warning signs in play
rect(s, 8.55, 1.3, 4.5, 5.5, RGBColor(0xFF, 0xEB, 0xEE))
textbox(s, 8.65, 1.38, 4.3, 0.45,
        "Attachment Concerns in Play", 15, bold=True, color=RGBColor(0xB7, 0x1C, 0x1C))
warnings = [
    "Child does not use parent as safe base",
    "No checking back during exploration",
    "Indiscriminate play with strangers",
    "Frozen / hypervigilant during play",
    "No pleasure or affect during play",
    "Restricted or chaotic play themes",
    "Aggression that ruptures play",
    "No repair after disruption",
]
for i, w in enumerate(warnings):
    textbox(s, 8.65, 1.95 + i*0.55, 4.2, 0.5,
            "⚠ " + w, 12, color=RGBColor(0x7F, 0x00, 0x00))

textbox(s, 0.3, 6.97, 12.7, 0.38,
        "Source: Kaplan & Sadock's Comprehensive Textbook of Psychiatry — Infant & Toddler Mental Status Examination, Section X.",
        10, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 12 — SCREEN TIME & PLAY
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Screens vs. Play: What Parents Need to Know",
           "Current guidance and the evidence base")

# AAP guidelines box
rect(s, 0.3, 1.3, 5.9, 5.8, TEAL_LIGHT)
textbox(s, 0.45, 1.38, 5.6, 0.45, "AAP Screen Time Guidelines", 17, bold=True, color=TEAL)

guidelines = [
    ("< 18 months", "Avoid screen use except video-chatting with family"),
    ("18–24 months", "High-quality programming only; watch together, discuss"),
    ("2–5 years", "Limit to 1 hr/day of high-quality content; co-view"),
    ("6+ years", "Consistent limits; screens should not displace sleep, play, homework, or physical activity"),
]
y_g = 1.95
for age, rec in guidelines:
    rect(s, 0.4, y_g, 1.7, 0.7, ORANGE)
    textbox(s, 0.42, y_g+0.06, 1.66, 0.58, age, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    textbox(s, 2.2, y_g+0.06, 3.8, 0.65, rec, 13, color=DARK)
    y_g += 0.88

# Evidence
rect(s, 0.3, 5.55, 5.9, 1.5, GRAY_BG)
textbox(s, 0.45, 5.62, 5.6, 0.4, "Evidence Note", 14, bold=True, color=TEAL)
textbox(s, 0.45, 6.05, 5.6, 0.9,
        "Bal et al. 2024 (PMID 39724067): Higher screen time associated with delayed language development "
        "and reduced executive function in systematic review of 34 studies.",
        12, color=DARK)

# Right panel: what to do instead
rect(s, 6.45, 1.3, 6.6, 5.8, RGBColor(0xE8, 0xF5, 0xE9))
textbox(s, 6.6, 1.38, 6.3, 0.45, "Replace Screens With Play", 17, bold=True, color=GREEN)

alternatives = [
    "Sensory bins (rice, water, sand, playdough)",
    "Building & stacking (blocks, Duplo, Magnatiles)",
    "Art and drawing materials — freely available",
    "Outdoor unstructured time every day",
    "Board games and puzzles (age-appropriate)",
    "Pretend / dramatic play corner at home",
    "Shared book reading (min. 15 min/day)",
    "Music — singing, instruments, dancing",
    "Cooking together (functional + symbolic play)",
]
for i, a in enumerate(alternatives):
    textbox(s, 6.6, 1.95 + i*0.57, 6.2, 0.5,
            "✓ " + a, 13, color=DARK)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 13 — PLAY DEPRIVATION & RED FLAGS
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "When Play Is Impaired: Red Flags and Clinical Action",
           "Early identification enables early intervention")

# Full red flags table
rect(s, 0.3, 1.3, 12.75, 0.55, RGBColor(0xB7, 0x1C, 0x1C))
for txt, cx, cw in zip(["Age", "Expected Play", "Red Flag", "Consider"],
                        [0.35, 1.55, 4.4, 9.4],
                        [1.1, 2.7, 4.8, 3.6]):
    textbox(s, cx, 1.33, cw, 0.46, txt, 14, bold=True, color=WHITE)

red_rows = [
    ("3 months", "Social play (smile, coo)", "No social smile; no response to faces",
     "Hearing screen; autism concerns; depression in caregiver"),
    ("12 months", "Sensorimotor; object play", "No pointing; not responding to name",
     "Autism spectrum; hearing loss; developmental delay"),
    ("18 months", "Functional + early symbolic", "No pretend play; no single words",
     "ASD screen (M-CHAT-R); speech-language referral"),
    ("24 months", "Parallel + symbolic", "No two-word phrases; isolated play",
     "Developmental evaluation; ASD; language disorder"),
    ("36 months", "Complex symbolic", "Rigid/stereotyped play only; no social play",
     "ASD; intellectual disability; trauma assessment"),
    ("5 years", "Cooperative, rule-based", "Cannot follow game rules; extreme aggression",
     "ADHD; ODD; attachment disorder; trauma"),
]

row_cols = [GRAY_BG, WHITE, GRAY_BG, WHITE, GRAY_BG, WHITE]
for i, (age, exp, flag, action) in enumerate(red_rows):
    y = 1.92 + i * 0.82
    for cx, cw, rc in zip([0.35, 1.55, 4.4, 9.4],
                           [1.1, 2.7, 4.8, 3.6],
                           [row_cols[i]]*4):
        rect(s, cx, y, cw, 0.75, rc)
    textbox(s, 0.38, y+0.05, 1.05, 0.65, age, 12, bold=True, color=TEAL)
    textbox(s, 1.58, y+0.05, 2.65, 0.65, exp, 12, color=DARK)
    textbox(s, 4.43, y+0.05, 4.75, 0.65, flag, 12, bold=True, color=RGBColor(0xB7, 0x1C, 0x1C))
    textbox(s, 9.43, y+0.05, 3.5, 0.65, action, 11, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 14 — PLAY IN SPECIAL POPULATIONS
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "Play in Special Populations",
           "Adapting play guidance for children with additional needs")

populations = [
    ("ASD", TEAL, [
        "Play often restricted to sensorimotor/functional",
        "Weak symbolic and cooperative play development",
        "Joint attention deficits interfere with shared play",
        "Intervention: ESDM, PRT, child-directed approaches",
        "Parents: be patient; enter child's preferred play first",
    ]),
    ("ADHD", GREEN, [
        "Short attention span disrupts sequential play",
        "Impulsivity leads to rule violations in group play",
        "Emotional dysregulation: exits games when losing",
        "Intervention: structured play with clear rules",
        "Parents: shorter play sessions; immediate praise",
    ]),
    ("Developmental\nDelay", ORANGE, [
        "Play stage may lag 6–12 months behind chronological age",
        "Adapt expectations to developmental (not chronological) age",
        "Use play-based therapy (OT, SLP, developmental therapist)",
        "Open-ended sensory toys often most engaging",
        "Parents: celebrate each stage achieved, however late",
    ]),
    ("Trauma /\nACE Exposure", RGBColor(0x55, 0x33, 0x99), [
        "Play themes may reflect traumatic events",
        "Hypervigilance; difficulty entering free play",
        "Repetitive re-enactment (not always pathological)",
        "Examiners: do not interpret play too literally",
        "Referral for trauma-focused play therapy (TF-CBT)",
    ]),
]

for i, (pop, col, pts) in enumerate(populations):
    x = 0.3 + i * 3.25
    rect(s, x, 1.3, 3.1, 5.75, GRAY_BG)
    rect(s, x, 1.3, 3.1, 0.68, col)
    textbox(s, x+0.05, 1.33, 3.0, 0.62, pop, 15, bold=True,
            color=WHITE, align=PP_ALIGN.CENTER)
    for j, pt in enumerate(pts):
        textbox(s, x+0.12, 2.1 + j*0.96, 2.85, 0.85,
                "▸ " + pt, 12, color=DARK)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 15 — THE CLINICIAN'S ROLE
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "The Clinician's Role: Play Guidance at Every Visit",
           "Integrating play promotion into developmental surveillance")

rect(s, 0.3, 1.3, 12.75, 0.55, TEAL)
for txt, cx, cw in zip(["Well-Visit Age", "Play Assessment", "Anticipatory Guidance for Parents"],
                        [0.35, 2.65, 6.1],
                        [2.2, 3.35, 6.6]):
    textbox(s, cx, 1.33, cw, 0.46, txt, 14, bold=True, color=WHITE)

visit_rows = [
    ("2–4 month",
     "Social smile, vocalisations, response to faces",
     "Talk and sing during every feed; tummy time; no screens"),
    ("9 month",
     "Object permanence, peek-a-boo, vocalising",
     "Floor play 30 min/day; name objects; read board books"),
    ("12 month",
     "Functional play, pointing, single words",
     "Follow child's lead; offer cause-effect toys; limit screens"),
    ("18 month",
     "Early symbolic play, imitation",
     "Pretend play together; open-ended toys; co-read daily"),
    ("24 month",
     "Parallel play, two-word phrases, complex symbolic",
     "Arrange play dates; dramatic play corner; reduce screens"),
    ("3 year",
     "Dramatic play, roles, narrative",
     "Dress-up box; ask about imaginary friends; outdoor play"),
    ("4–5 year",
     "Cooperative play, rule-based games",
     "Board games; unstructured outdoor time; limit structured activities"),
    ("6–8 year",
     "Rule-based sports and games, team play",
     "Protect recess; model sportsmanship; monitor peer dynamics"),
]

row_cols = [GRAY_BG, WHITE] * 4
for i, (visit, assess, guidance) in enumerate(visit_rows):
    y = 1.92 + i * 0.64
    for cx, cw, rc in zip([0.35, 2.65, 6.1],
                           [2.2, 3.35, 6.6],
                           [row_cols[i]]*3):
        rect(s, cx, y, cw, 0.58, rc)
    textbox(s, 0.38, y+0.05, 2.1, 0.5, visit, 12, bold=True, color=TEAL)
    textbox(s, 2.68, y+0.05, 3.25, 0.5, assess, 12, color=DARK)
    textbox(s, 6.13, y+0.05, 6.5, 0.5, guidance, 12, color=GRAY_TEXT)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 16 — KEY MESSAGES TAKE HOME
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, TEAL)

rect(s, 0, 0, 13.333, 1.15, RGBColor(0x00, 0x4D, 0x5C))
textbox(s, 0.3, 0.07, 12.7, 0.75, "Key Take-Home Messages", 32, bold=True,
        color=WHITE, align=PP_ALIGN.CENTER)
textbox(s, 0.3, 0.75, 12.7, 0.35, "For parents and clinicians alike", 15,
        color=RGBColor(0xCC, 0xEE, 0xF2), align=PP_ALIGN.CENTER, italic=True)

messages = [
    ("1", "Play IS development", "It is not a break from learning — it IS the learning."),
    ("2", "Follow the child", "Child-directed play builds autonomy, motivation, and self-regulation."),
    ("3", "Stages are sequential", "Each stage is a prerequisite for the next; you cannot rush symbolic play."),
    ("4", "Parent presence matters", "Responsive, warm play interactions build secure attachment and brain architecture."),
    ("5", "Protect unstructured time", "Over-scheduling is a risk factor. Children need free play every single day."),
    ("6", "Screens displace play", "Every screen hour is a missed play hour. Enforce age-appropriate limits."),
    ("7", "Red flags need action", "Delayed play milestones warrant developmental screening — early is better."),
]

for i, (num, title, body) in enumerate(messages):
    row = i % 4
    col = i // 4
    x = 0.25 + col * 6.6
    y = 1.3 + row * 1.5
    rect(s, x, y, 6.3, 1.35, WHITE)
    rect(s, x, y, 0.6, 1.35, ORANGE)
    textbox(s, x, y, 0.6, 1.35, num, 22, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    textbox(s, x+0.7, y+0.08, 5.45, 0.45, title, 16, bold=True, color=TEAL)
    textbox(s, x+0.7, y+0.55, 5.45, 0.65, body, 13, color=DARK)

# bottom strip
rect(s, 0, 7.1, 13.333, 0.4, ORANGE)
textbox(s, 0, 7.13, 13.333, 0.35,
        "\"The ability to play is one of the principal criteria of mental health.\" — Donald Winnicott",
        13, bold=True, color=WHITE, align=PP_ALIGN.CENTER, italic=True)


# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 17 — REFERENCES
# ══════════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header_bar(s, "References & Further Reading")

refs = [
    "1.  Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. "
    "(Sadock BJ, Sadock VA, Ruiz P). Section on Infant & Toddler Mental Status Examination — Play.",
    "2.  Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. Developmental Milestones — "
    "Preschool and School-Age Play.",
    "3.  American Academy of Pediatrics (AAP). 'The Power of Play: A Pediatric Role in Enhancing "
    "Development in Young Children.' Pediatrics 2018; 142(3): e20182058.",
    "4.  Murray R et al. 'The Crucial Role of Recess in School: Policy Statement.' "
    "Pediatrics 2026; PMID 42107976.",
    "5.  Schneider M, Falkenberg I, Berger P. 'Parent-Child Play and the Emergence of Externalizing "
    "and Internalizing Behavior Problems in Childhood: A Systematic Review.' "
    "Front Psychol 2022; PMID 35586226.",
    "6.  Bal M et al. 'Examining the relationship between language development, executive function, "
    "and screen time: A Systematic Review.' PLoS One 2024; PMID 39724067.",
    "7.  Piaget J. The Construction of Reality in the Child. Basic Books, 1954.",
    "8.  Winnicott DW. Playing and Reality. Tavistock Publications, 1971.",
    "9.  Greenspan SI, Wieder S. Engaging Autism. Da Capo Press, 2006.",
]

for i, ref in enumerate(refs):
    y = 1.35 + i * 0.62
    textbox(s, 0.4, y, 12.5, 0.55, ref, 12, color=DARK)

rect(s, 0, 7.1, 13.333, 0.4, TEAL)
textbox(s, 0, 7.13, 13.333, 0.35,
        "Seminar prepared using Kaplan & Sadock's textbooks; AAP policy statements; PubMed-indexed systematic reviews (2022–2026)",
        12, color=WHITE, align=PP_ALIGN.CENTER, italic=True)


# ── SAVE ──────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/play-seminar/Developmental_Stages_of_Play_Seminar.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/play-seminar && python build_pptx.py

Running Command

ls -lh /tmp/workspace/play-seminar/

Your 60-90 minute seminar presentation is ready:

Developmental Stages of Play Seminar

Presentation · PPTX


What's Inside (17 slides)

#SlidePurpose
1Title SlideOpening — includes Winnicott quote anchor
2Learning Objectives5 numbered objectives for both parents and clinicians
3Why Play Matters4-domain grid (cognitive, emotional, social, physical)
4Overview TableAll 6 stages at a glance with age, features, and Piaget link
5Sensorimotor Play (0-12 mo)What it looks like + parental implications + red flags
6Functional Play (12-18 mo)Object use, naming, child-directed play
7Parallel + Early Symbolic (18 mo-3 yr)Side-by-side play; pretend begins; screen time guidance
8Complex Symbolic / Dramatic (30 mo-5 yr)Imaginary companions; doll play as clinical window
9Cooperative / Rule-Based (4-8 yr)Recess; sportsmanship; AAP 2026 policy
10Parent's Role Across StagesPlaymate → Co-player → Stage manager → Facilitator
11Play and AttachmentSecure base loop; attachment warning signs
12Screens vs. PlayAAP guidelines by age + evidence-based alternatives
13Red Flags TableAge 3 mo through 8 yr — expected play, red flag, clinical action
14Special PopulationsASD, ADHD, Developmental Delay, Trauma/ACE
15Clinician's Role by Well-VisitPractical guidance for every visit from 2 months to school age
16Key Take-Home Messages7 messages for parents and clinicians
17ReferencesKaplan & Sadock, AAP policy statements, 4 PubMed-indexed studies

Evidence Base Used

  • Kaplan & Sadock's Comprehensive Textbook of Psychiatry - Infant & Toddler Mental Status Examination, Section VIII: Play
  • Kaplan & Sadock's Synopsis of Psychiatry - Developmental Milestones in Preschoolers
  • Schneider et al. 2022 (Front Psychol, PMID 35586226) - Systematic review on parent-child play and behavioral outcomes
  • Bal et al. 2024 (PLoS One, PMID 39724067) - Screen time, language development, and executive function
  • Murray et al. 2026 (Pediatrics, PMID 42107976) - AAP 'Crucial Role of Recess' policy statement (most recent, June 2026)

Gdd plus ptosis plus asd

Reading File
This is a clinical diagnostic scenario - GDD (global developmental delay) + ptosis + ASD features - this triad is highly suggestive of a syndromic diagnosis. The classic teaching is KAT6A syndrome, Noonan syndrome, CHARGE syndrome, Kabuki syndrome, or mitochondrial disease, but the combination also strongly raises KAT6A, MED13L, or Phelan-McDermid (22q13). Let me search the library and PubMed in parallel.
Searching sources...
Finding Sources
Finding Sources
Searching PubMed

GDD ptosis autism spectrum disorder syndrome genetic

Finding Sources
Finding Sources
Searching PubMed

KAT6A syndrome developmental delay autism ptosis

Searching PubMed

Noonan syndrome autism spectrum disorder developmental delay

Finding Sources
Finding Sources
Searching PubMed

KAT6A syndrome intellectual disability autism features

Searching the Web

GDD ptosis ASD syndromic differential diagnosis genetics pediatric neurology 2024

Finding Sources
Finding Sources
Searching PubMed

ZNF462 syndrome ptosis autism developmental delay

Reading File
Reading Article

PMID: 31361404

Reading Article

PMID: 38741077

Loading Image
Searching PubMed

Weiss-Kruszka syndrome ZNF462 ptosis developmental delay autism

Searching PubMed

AUTS2 syndrome ptosis intellectual disability autism features

Reading Article

PMID: 34573342

Searching the Web

syndromes GDD ptosis ASD differential diagnosis KAT6A Noonan ZNF462 AUTS2 Kabuki Mowat-Wilson Angelman 2024

I now have comprehensive evidence. Let me compile the full clinical response.

GDD + Ptosis + ASD — Syndromic Differential Diagnosis

This triad (global developmental delay + ptosis + autism spectrum disorder features) is a classic pointer to a syndromic genetic etiology. Isolated ASD with GDD alone has a ~15-25% genetic yield on CMA + WES; when you add ptosis as a dysmorphic feature, the yield climbs substantially and the differential narrows meaningfully.

Approach the Triad Systematically

What Type of Ptosis?

Before running through the differential, characterize the ptosis:
Ptosis FeaturePoints Toward
Bilateral, congenital, nonprogressiveNoonan, KAT6A, ZNF462 (Weiss-Kruszka), Kabuki
Bilateral + fatigableCongenital myasthenic syndrome (CMS)
Unilateral3rd nerve palsy, Horner, structural
Associated with ophthalmoplegiaCPEO, mitochondrial disease
Worsening over timeMitochondrial (MELAS, CPEO), myotonic dystrophy
With epicanthal folds + short palpebral fissuresDown syndrome (but usually obvious)

Priority Differential Diagnoses

1. Noonan Syndrome (RASopathy — PTPN11, SOS1, RAF1, KRAS, NRAS, RIT1)

The most common syndromic DD + ptosis diagnosis to exclude.
  • Ptosis: bilateral, congenital, full upper eyelids with down-slanting palpebral fissures - a hallmark feature
  • GDD/ID: present in 6-23% (IQ < 70); much higher rates of learning difficulties and borderline IQ
  • ASD/autism traits: RASopathy-associated ASD is well documented; Geoffray et al. 2020 (PMID 33519543) established an ASD symptom profile across all RASopathies
  • Other features to look for: short stature, congenital heart disease (pulmonary stenosis in 50-80%, HCM), webbed neck, low posterior hairline, hypertelorism, cryptorchidism in males, coagulation defects
  • Genotype note: KRAS variants carry the highest cognitive burden; RAF1/RIT1 → higher HCM risk
  • Source: Thompson & Thompson Genetics 9th ed., p. 558

2. ZNF462 Loss-of-Function (Weiss-Kruszka Syndrome)

Highly relevant - ptosis is a defining feature of this syndrome.
Kruszka et al. 2019 (PMID 31361404) delineated 24 patients:
  • Ptosis: 83% - the most prominent facial feature
  • Developmental delay: 79%
  • ASD: 33%
  • Other: down-slanting palpebral fissures (58%), exaggerated Cupid's bow/wide philtrum (54%), arched eyebrows (50%), hypotonia (50%), metopic ridging/craniosynostosis (33%), corpus callosum dysgenesis (25%), structural heart defects (21%)
  • Mechanism: haploinsufficiency of ZNF462 (vertebrate-specific zinc finger protein, critical for embryonic development)
  • Diagnosis: WES or gene panel
  • This syndrome is frequently mistaken for Noonan clinically; facial analysis AI can differentiate them

3. KAT6A Syndrome (Arboleda-Tham Syndrome)

Strong fit for the GDD + ASD + ptosis triad.
  • Caused by pathogenic variants in KAT6A (lysine acetyltransferase 6A) - a Mendelian disorder of the epigenetic machinery
  • GDD/ID: universal; speech/language severely impaired; many are minimally verbal
  • ASD features: restricted interests and repetitive behaviors are common; notably, social drive is relatively preserved despite ASD features - an unusual phenotype (Ng et al. 2024, PMID 38741077)
  • Ptosis: reported as a facial feature in the original case series and confirmed in subsequent reports (PMID 39740728)
  • Other features: feeding difficulties (major issue in infancy), cardiac defects, microcephaly, hypotonia
  • Truncating variants (late > early) → more severe cognitive phenotype
  • Diagnosis: WES; KAT6A is a de novo dominant gene

4. AUTS2 Syndrome

Classic GDD + ASD triad + ptosis.
Sanchez-Jimeno et al. 2021 (PMID 34573342) - cumulative data on all published patients:
  • GDD/ID: 98%
  • ASD/autistic traits: 52%, with ADHD in 54%
  • Ptosis: 40% (each of ptosis, hypotonia, feeding difficulties)
  • Microcephaly: 65%
  • Short stature: common
  • Genotype-phenotype: 3' variants (C-terminal) cause more severe phenotype (higher ASSS score)
  • Mechanism: AUTS2 haploinsufficiency; WNT/β-catenin pathway hyperactivation
  • Key distinguishing feature: microcephaly is prominent; hyperactivity/ADHD is a core feature

5. Kabuki Syndrome (KMT2D, KDM6A)

  • Ptosis + strabismus: present in a proportion
  • ID: mild-to-moderate (universal)
  • ASD: documented, particularly in KDM6A (Type 2)
  • Other features: long palpebral fissures, arched/broad eyebrows, eversion of the lateral lower eyelid, large/prominent/cupped ears, fetal fingertip pads, postnatal growth deficiency
  • Key distinguishing feature: persistent fetal fingertip pads is a hallmark
  • Kabuki syndrome 2024 case with ASD

6. CHARGE Syndrome (CHD7)

  • Coloboma, Heart defects, Atresia choanae, Retardation of growth/development, Genital abnormalities, Ear anomalies
  • Ptosis can be present; ASD is common (up to 50%)
  • Distinguish from Kabuki by: coloboma, choanal atresia, semicircular canal hypoplasia, CHD7 mutation

7. Mitochondrial Disease (multiple loci)

  • Especially if ptosis is progressive or accompanied by ophthalmoplegia
  • GDD + ASD features reported
  • Look for: lactic acidosis, ragged red fibers, multi-system involvement, maternal inheritance pattern
  • Screen with lactate, pyruvate, CSF lactate, mitochondrial gene panel or WGS

8. Angelman Syndrome (UBE3A)

  • Severe GDD, absent/near-absent speech, seizures, happy/excitable affect, ataxia
  • ASD features very common
  • Ptosis occasionally reported
  • Confirm with methylation analysis + UBE3A sequencing

9. Mowat-Wilson Syndrome (ZEB2)

  • GDD (severe), ASD features, epilepsy, Hirschsprung disease
  • Distinctive face: widely spaced eyes, deep-set eyes, prominent chin, happy affect
  • Ptosis described as a feature

Differentiating Features at a Glance

SyndromeGenePtosis (%)ASD (%)GDD SeverityKey Distinguishing Feature
NoonanPTPN11+~30-40%10-20%Mild-moderateCHD (pulm stenosis), short stature, HCM
ZNF462 (Weiss-Kruszka)ZNF46283%33%Mild-moderateCraniosynostosis, CC dysgenesis
KAT6AKAT6APresent~30-40%Moderate-severeMinimal verbal; preserved social drive
AUTS2AUTS240%52%Moderate-severeMicrocephaly, ADHD dominant
KabukiKMT2D/KDM6APresentVariableMild-moderateFetal fingertip pads, ear morphology
CHARGECHD7Present~50%Moderate-severeColoboma, choanal atresia, ear anom

Investigation Algorithm

Step 1 (Tier 1 — do first):
  ├── Chromosomal Microarray (CMA) — detects CNVs
  ├── Fragile X (FMR1) — especially in males
  └── Methylation studies (Angelman/Prader-Willi if clinically suspected)

Step 2 (Tier 2 — if CMA/Fragile X negative):
  └── Whole Exome Sequencing (WES) trio (proband + parents)
      - Highest yield in GDD + dysmorphism: ~40-66% diagnostic
      - Will detect KAT6A, ZNF462, AUTS2, KMT2D, CHD7, ZEB2, etc.
      - Note: Noonan/RASopathies: dedicated RASopathy panel or WES

Step 3 (Specific add-ons based on phenotype):
  ├── If progressive ptosis + ophthalmoplegia → Mitochondrial workup
  ├── If craniosynostosis → Cranial CT + ZNF462 targeted
  ├── If Hirschsprung → ZEB2 (Mowat-Wilson)
  └── If seizures → EEG + expanded epilepsy panel

Additional Workup for All

  • Brain MRI (corpus callosum anomalies in ZNF462; cerebellar/cortical in many)
  • Ophthalmology (coloboma, strabismus, visual acuity)
  • Cardiology (ECG + echo)
  • Hearing screen
  • Formal ASD assessment (ADOS-2 / ADI-R)
  • Metabolic screen (lactate, ammonia, organic acids, amino acids)

Clinical Pearl

The combination of ptosis + GDD + ASD without a clear syndrome gestalt is the exact phenotype that maximally benefits from trio WES as first-line investigation (ahead of panel testing). Diagnostic yield in this triad is likely 40-55%. ZNF462 and KAT6A are consistently underdiagnosed because they are recent descriptions not taught in traditional genetics curricula.
Sources: Thompson & Thompson Genetics 9th ed. (Noonan syndrome); Kaplan & Sadock's Comprehensive Textbook (behavioral phenotypes); Kruszka et al. 2019 PMID 31361404 (ZNF462); Ng et al. 2024 PMID 38741077 (KAT6A); Sanchez-Jimeno et al. 2021 PMID 34573342 (AUTS2); Geoffray et al. 2020 PMID 33519543 (RASopathies + ASD)

Can you create revised ppt you made earlier with 6 stages of play Unoccupied Solitary Overlooker Parallel associative Cooperative and theme of pediatrician seminar

The user wants a revised version of the earlier PPTX using Parten's 6 stages of play (Unoccupied, Solitary, Onlooker, Parallel, Associative, Cooperative) instead of the sensorimotor/symbolic framework, with a pediatrician seminar theme.
Revising...
Finding Sources
Finding Sources
Writing File

~/play-seminar/build_parten_pptx.py


from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from io import BytesIO

# ── Palette ────────────────────────────────────────────────────────────────
DEEP_TEAL   = RGBColor(0x00, 0x5F, 0x73)   # primary header
MED_TEAL    = RGBColor(0x00, 0x8B, 0x8B)
LIGHT_TEAL  = RGBColor(0xD4, 0xEE, 0xF1)
ORANGE      = RGBColor(0xCA, 0x6F, 0x1E)   # accent / badge
GOLD        = RGBColor(0xF0, 0xB2, 0x27)
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK        = RGBColor(0x17, 0x20, 0x2A)
GRAY_BG     = RGBColor(0xF2, 0xF5, 0xF7)
GRAY_TEXT   = RGBColor(0x5D, 0x6D, 0x7E)
RED_SOFT    = RGBColor(0xFD, 0xED, 0xEC)
RED_TEXT    = RGBColor(0xA9, 0x19, 0x19)
GREEN_SOFT  = RGBColor(0xE9, 0xF7, 0xEF)
GREEN_DARK  = RGBColor(0x1E, 0x6B, 0x35)

# Parten stage colours (one per stage)
S_COLORS = [
    RGBColor(0x78, 0x28, 0x9C),   # 1 Unoccupied  — purple
    RGBColor(0x21, 0x6F, 0xAD),   # 2 Solitary    — blue
    RGBColor(0x0E, 0x85, 0x6E),   # 3 Onlooker    — teal-green
    RGBColor(0xCA, 0x6F, 0x1E),   # 4 Parallel    — orange
    RGBColor(0xB0, 0x3A, 0x2E),   # 5 Associative — red
    RGBColor(0x00, 0x5F, 0x73),   # 6 Cooperative — deep teal
]

W = Inches(13.333)
H = Inches(7.5)

prs = Presentation()
prs.slide_width  = W
prs.slide_height = H
blank = prs.slide_layouts[6]

# ── Helpers ────────────────────────────────────────────────────────────────

def bg(slide, color):
    fill = slide.background.fill
    fill.solid()
    fill.fore_color.rgb = color

def rect(slide, l, t, w, h, color):
    from pptx.util import Emu
    shape = slide.shapes.add_shape(1,
        Inches(l), Inches(t), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = color
    shape.line.fill.background()
    return shape

def tb(slide, l, t, w, h, text, size, bold=False, italic=False,
       color=None, align=PP_ALIGN.LEFT, wrap=True):
    box = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf  = box.text_frame
    tf.word_wrap = wrap
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = Pt(1)
    for i, line in enumerate(text.split('\n')):
        p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
        p.alignment = align
        r = p.add_run()
        r.text        = line
        r.font.size   = Pt(size)
        r.font.bold   = bold
        r.font.italic = italic
        if color:
            r.font.color.rgb = color

def header(slide, title, sub=None):
    rect(slide, 0, 0, 13.333, 1.2, DEEP_TEAL)
    # accent stripe
    rect(slide, 0, 1.1, 13.333, 0.1, GOLD)
    tb(slide, 0.35, 0.06, 12.6, 0.72, title, 31, bold=True,
       color=WHITE, align=PP_ALIGN.LEFT)
    if sub:
        tb(slide, 0.35, 0.75, 12.6, 0.38, sub, 14, italic=True,
           color=RGBColor(0xCC, 0xE8, 0xEC), align=PP_ALIGN.LEFT)

def badge(slide, l, t, text, color):
    rect(slide, l, t, 2.1, 0.48, color)
    tb(slide, l, t, 2.1, 0.48, text, 14, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)

def red_flag_bar(slide, text, y=5.55):
    rect(slide, 0.3, y, 12.75, 0.68, RED_SOFT)
    tb(slide, 0.42, y+0.04, 12.4, 0.6,
       "🚩 Red Flags: " + text, 13, color=RED_TEXT)

def source_note(slide, text):
    tb(slide, 0.3, 7.1, 12.7, 0.38, text, 10,
       italic=True, color=GRAY_TEXT)

def bullet_panel(slide, l, t, w, h, title, items, bg_col, title_col=DEEP_TEAL, fs=14):
    rect(slide, l, t, w, h, bg_col)
    tb(slide, l+0.15, t+0.1, w-0.25, 0.42, title, 16, bold=True, color=title_col)
    for i, item in enumerate(items):
        tb(slide, l+0.22, t+0.6+i*0.46, w-0.32, 0.42,
           "▸ " + item, fs, color=DARK)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 1  —  TITLE
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, DEEP_TEAL)
rect(s, 1.15, 1.2, 11.0, 5.15, WHITE)
rect(s, 1.15, 1.2, 11.0, 0.08, GOLD)   # top gold stripe
rect(s, 1.15, 6.27, 11.0, 0.08, GOLD)  # bottom gold stripe

tb(s, 1.35, 1.38, 10.6, 1.0,
   "Developmental Stages of Play", 38, bold=True,
   color=DEEP_TEAL, align=PP_ALIGN.CENTER)
tb(s, 1.35, 2.42, 10.6, 0.65,
   "Parten's Framework: Parental Implications in Clinical Practice", 22,
   italic=True, color=DARK, align=PP_ALIGN.CENTER)

rect(s, 3.8, 3.22, 5.75, 0.06, GOLD)

tb(s, 1.35, 3.42, 10.6, 0.5,
   "A Seminar for Developmental Pediatricians", 17,
   color=GRAY_TEXT, align=PP_ALIGN.CENTER)
tb(s, 1.35, 3.98, 10.6, 0.45,
   "Mixed Audience: Parents and Clinicians  |  60–90 Minutes", 15,
   color=GRAY_TEXT, align=PP_ALIGN.CENTER, italic=True)
tb(s, 1.35, 4.58, 10.6, 0.45,
   "July 2026", 14, italic=True, color=GRAY_TEXT, align=PP_ALIGN.CENTER)

rect(s, 0, 6.8, 13.333, 0.7, ORANGE)
tb(s, 0, 6.84, 13.333, 0.45,
   '"Play is the highest form of research." — Albert Einstein',
   15, bold=True, color=WHITE, align=PP_ALIGN.CENTER, italic=True)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 2  —  LEARNING OBJECTIVES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Learning Objectives",
       "By the end of this seminar participants will be able to:")

objs = [
    "Describe Parten's 6 stages of social play and their approximate age of emergence",
    "Link each stage to cognitive, social, emotional and language milestones",
    "Identify specific parental behaviours that support (or hinder) each stage",
    "Recognise red flags for developmental delay based on atypical play patterns",
    "Integrate play-stage guidance into anticipatory counselling at well-child visits",
]
for i, obj in enumerate(objs):
    y = 1.38 + i * 1.08
    rect(s, 0.5, y, 12.35, 0.88, LIGHT_TEAL)
    rect(s, 0.5, y, 0.55, 0.88, DEEP_TEAL)
    tb(s, 0.5, y, 0.55, 0.88, str(i+1), 18, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 1.15, y+0.14, 11.5, 0.65, obj, 17, color=DARK)

source_note(s, "Framework: Mildred Parten (1932). Social participation among pre-school children. J Abnorm Soc Psychol; supplemented with AAP 2018 Play Policy Statement.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 3  —  PARTEN FRAMEWORK OVERVIEW (visual roadmap)
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Parten's 6 Stages of Play: The Road Map",
       "Social complexity increases progressively — earlier stages persist alongside later ones")

stage_names = ["1. Unoccupied", "2. Solitary", "3. Onlooker", "4. Parallel", "5. Associative", "6. Cooperative"]
stage_ages  = ["0–3 mo", "0–2 yr", "2–2.5 yr", "2–3 yr", "3–4 yr", "4+ yr"]
stage_desc  = [
    "Random movements\nno clear goal",
    "Plays alone,\nindependent",
    "Watches others,\ndoes not join",
    "Near others,\nno interaction",
    "Interacts, shares,\nno organised goal",
    "Organised groups,\nshared goals & rules",
]

box_w = 1.98
for i, (name, age, desc, col) in enumerate(zip(stage_names, stage_ages, stage_desc, S_COLORS)):
    x = 0.28 + i * 2.13
    # main box
    rect(s, x, 1.35, box_w, 4.6, GRAY_BG)
    # colour header
    rect(s, x, 1.35, box_w, 0.72, col)
    tb(s, x+0.05, 1.37, box_w-0.1, 0.4, name, 13, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, x+0.05, 1.72, box_w-0.1, 0.32, age, 12,
       color=WHITE, align=PP_ALIGN.CENTER, italic=True)
    tb(s, x+0.1, 2.14, box_w-0.15, 0.9, desc, 13,
       color=DARK, align=PP_ALIGN.CENTER)

    # Arrow connector (except last)
    if i < 5:
        rect(s, x + box_w + 0.02, 3.45, 0.1, 0.3, GRAY_TEXT)
        tb(s, x + box_w + 0.08, 3.34, 0.2, 0.45, "►", 14, color=GRAY_TEXT)

# Developmental axis label
rect(s, 0.28, 6.05, 12.77, 0.32, LIGHT_TEAL)
tb(s, 0.32, 6.07, 12.7, 0.28,
   "◄─── Increasing Social Complexity  |  Increasing Age  |  Earlier stages continue to co-exist with later stages ───►",
   12, color=DEEP_TEAL, align=PP_ALIGN.CENTER)

source_note(s, "Parten MB, 1932 | Kaplan & Sadock's Synopsis of Psychiatry 12th ed. — Preschool Developmental Milestones")


# ══════════════════════════════════════════════════════════════════════════
# SLIDES 4–9  —  One slide per stage
# ══════════════════════════════════════════════════════════════════════════

stages_data = [
    # (num, name, age, stage_color, what_looks_like, parental_implications, red_flags, dev_link, clinical_note)
    (
        1, "Unoccupied Play", "Birth – 3 months",
        S_COLORS[0],
        [
            "Infant makes random, unplanned movements with no clear goal",
            "Gazes at objects/faces without purposeful engagement",
            "Vocalises randomly — not directed at anyone",
            "Wiggles, stretches, briefly focuses then looks away",
            "Pauses to look when something catches attention",
        ],
        [
            "Maximise face-to-face interaction: smile, talk, sing",
            "Tummy time from Day 1 — stimulates motor and sensory pathways",
            "Offer high-contrast patterns and a mobile above the cot",
            "Respond promptly to every coo and cry — foundation of secure attachment",
            "Narrate your actions aloud: 'I'm picking you up now'",
            "No screens — unoccupied play IS active brain development",
        ],
        "No social smile by 6–8 weeks | No visual tracking by 8 weeks | No response to voice | "
        "Absent spontaneous movement",
        "Piaget Sensorimotor Stage 1: learning via reflex and sensation. "
        "Even 'random' movement builds the neural circuits for all later play.",
        "Clinically: unoccupied behaviour that persists well beyond 3–4 months warrants developmental surveillance. "
        "It re-emerges in children with severe ID or autism as their habitual play style.",
    ),
    (
        2, "Solitary Independent Play", "Birth – 2 years (peak 0–18 months)",
        S_COLORS[1],
        [
            "Child plays alone, completely absorbed in own activity",
            "Does not notice or invite other children; not interested in what others do",
            "Explores objects individually: mouths, bangs, drops, shakes",
            "Progression: rattles → cause-effect toys → stacking → pretend",
            "Healthy and expected as the dominant mode up to 18 months",
        ],
        [
            "Respect the child's self-directed focus — do not constantly interrupt",
            "Provide a rich, safe physical environment for independent exploration",
            "Sit nearby as a 'safe base' — reassuring presence without intrusion",
            "Offer open-ended objects: cups, blocks, spoons, safe household items",
            "Narrate play from a distance: 'You're building a tower!'",
            "Solitary play in toddlers is NORMAL — reassure anxious parents",
        ],
        "Persistent solitary play with zero peer interest after age 3 | "
        "Rigid, repetitive solitary play with only one object/topic | "
        "No functional object use by 15 months",
        "Builds executive function (self-direction), fine motor (object manipulation), "
        "and cognitive schema formation. Language develops through self-talk during solitary play.",
        "Red flag context: solitary play that is stereotyped, restricted, and resists any social "
        "engagement after age 3 is a core ASD signal. Distinguish from developmentally appropriate "
        "solitary play in toddlers.",
    ),
    (
        3, "Onlooker (Spectator) Play", "2 – 2½ years",
        S_COLORS[2],
        [
            "Child watches other children play with definite interest",
            "Stands or sits within speaking distance — observes but does not join",
            "May ask questions or make comments to playing children",
            "Does not make any effort to enter the play",
            "Active, attentive observing — not passive disinterest",
        ],
        [
            "Do NOT force entry into play — this stage is developmentally essential",
            "Validate: 'You're watching how they play with the blocks, aren't you?'",
            "Position child at group play so they can observe comfortably",
            "Allow observation time before a play date — then offer gentle prompts",
            "Shy/anxious children use onlooker play extensively — it is a bridge stage",
            "Do not label onlooker children as 'shy' or 'anti-social' to parents",
        ],
        "Persistent onlooker play beyond 3 years with zero attempt to join peers | "
        "No eye contact with playing children | Flat affect during watching | "
        "Marked anxiety at proximity to other children",
        "Onlooker play is a cognitive rehearsal strategy. The child is processing social rules, "
        "turn-taking, and group norms before attempting participation. It maps to Vygotsky's "
        "'zone of proximal development' — learning by watching.",
        "Clinical tip: onlooker play is frequently misinterpreted by parents as a problem. "
        "Reassurance is the main intervention. Persistent onlooker behaviour after 3½ years, "
        "especially with social anxiety or ASD features, warrants formal evaluation.",
    ),
    (
        4, "Parallel Play", "2 – 3 years",
        S_COLORS[3],
        [
            "Child plays independently but alongside other children",
            "Uses similar toys or mimics nearby child's actions — no direct interaction",
            "Aware of the other child but does not engage",
            "May imitate what the nearby child does with a toy",
            "Classic: two toddlers at a sand-table, both digging — not together",
        ],
        [
            "Arrange play dates — parallel play requires proximity, not forced sharing",
            "Do NOT demand sharing at this stage: the cognitive ability is still developing",
            "Provide duplicate toys so both children can 'do the same thing'",
            "Praise proximity and imitation: 'You and Lena are both building!'",
            "Facilitate gradual transition: bring children physically closer over time",
            "Reassure parents: parallel play is healthy and age-appropriate",
        ],
        "No awareness of other children at all by age 2.5 | "
        "Distress at proximity to peers | No imitation of peers' actions | "
        "Regression from earlier social interest",
        "Parallel play signals early social awareness without yet having the cognitive capacity "
        "for joint interaction. It is the first step in peer socialisation — crucially, "
        "it is documented in Kaplan & Sadock as the normal social mode at 2½–3 years.",
        "Kaplan & Sadock's Synopsis: 'Between 2½ and 3 years, children commonly engage in "
        "parallel play, solitary play alongside another child with no interaction between them.' "
        "Forcing cooperative play at this age creates unnecessary parent-child conflict.",
    ),
    (
        5, "Associative Play", "3 – 4 years",
        S_COLORS[4],
        [
            "Children interact, share materials, and talk about the activity",
            "There is no organised goal, leader, or structure to the group",
            "Each child still pursues their own agenda within the shared activity",
            "Borrowing and lending toys; commenting on what others are doing",
            "Classic: group of 3-year-olds at the playdough table — talking, sharing, no set plan",
        ],
        [
            "Encourage small group activities: art corner, water play, shared playdough",
            "Teach turn-taking explicitly: 'First Maya, then you'",
            "Model sharing language: 'Can I use that colour when you're done?'",
            "Do not impose a 'leader' — let interaction be organic",
            "Observe for children who are consistently excluded — early social difficulty",
            "Use play narratives to build vocabulary and emotional language",
        ],
        "Cannot sustain any interaction with peers by age 3.5 | "
        "Aggression or distress when another child uses the same materials | "
        "No turn-taking or verbal exchange during shared activity | "
        "Consistent social exclusion by peers",
        "Associative play develops theory of mind foundations, negotiation skills, and "
        "pragmatic language. Emotional regulation is tested when desires conflict — "
        "disagreements during associative play are developmentally productive.",
        "Intervention window: children who remain in solitary or parallel play after 3.5 years "
        "benefit from social skills groups, speech-language therapy targeting pragmatics, and "
        "structured play sessions with therapist support.",
    ),
    (
        6, "Cooperative Play", "4 years and beyond",
        S_COLORS[5],
        [
            "Organised group play with a shared goal, roles, and rules",
            "Children negotiate roles: 'I'm the doctor, you're the patient'",
            "Group has a product or outcome: a play, a building, winning a game",
            "Turn-taking, rule enforcement, and conflict resolution all present",
            "Dramatic/sociodramatic play, board games, team sports all qualify",
        ],
        [
            "Teach sportsmanship explicitly: how to win and how to lose",
            "Introduce simple board games and card games (ages 4–5)",
            "Allow natural conflict resolution before intervening",
            "Protect unstructured outdoor play: recess is irreplaceable (AAP 2026)",
            "Limit over-scheduling of structured activities — free cooperative play is the goal",
            "Monitor for bullying and exclusion — cooperative play is where these emerge",
        ],
        "Cannot follow rules of simple games by age 5 | "
        "Consistent exclusion from peer groups | Severe frustration/aggression when losing | "
        "No ability to take on a role or follow a shared script",
        "Cooperative play requires concrete operational thinking (Piaget), theory of mind, "
        "executive function (inhibitory control, working memory), and emotional regulation. "
        "It is the developmental pinnacle of social play.",
        "AAP 2026 Recess Policy (PMID 42107976): recess — the primary context for cooperative play "
        "at school age — improves attention, executive function, social-emotional learning, and "
        "academic achievement. Advocacy for recess is a pediatrician's clinical responsibility.",
    ),
]

for num, name, age, col, what, impl, flags, dev_link, clin_note in stages_data:
    s = prs.slides.add_slide(blank)
    bg(s, WHITE)
    header(s, f"Stage {num}: {name}", f"{age}  —  Parten's Social Play Taxonomy")

    badge(s, 0.3, 1.35, age, col)

    # What it looks like (left panel)
    bullet_panel(s, 0.3, 1.95, 5.95, 3.1,
                 "What Play Looks Like", what, LIGHT_TEAL, col, fs=13)

    # Parental implications (right panel)
    bullet_panel(s, 6.45, 1.95, 6.6, 3.1,
                 "Parental Implications", impl,
                 RGBColor(0xFF, 0xF6, 0xE8), ORANGE, fs=13)

    # Red flags
    red_flag_bar(s, flags, y=5.2)

    # Dev link + clinical note
    rect(s, 0.3, 5.98, 12.75, 1.1, GRAY_BG)
    tb(s, 0.42, 6.02, 2.5, 0.25, "Developmental Link:", 11, bold=True, color=DEEP_TEAL)
    tb(s, 0.42, 6.25, 6.1, 0.75, dev_link, 11, italic=True, color=DARK)
    tb(s, 6.7, 6.02, 6.2, 1.02, "📋 " + clin_note, 11, color=GRAY_TEXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 10  —  COMPARISON TABLE ALL 6 STAGES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Parten's 6 Stages: Clinical Quick-Reference Table",
       "All ages are approximate — stages overlap and co-exist")

hdrs = ["Stage", "Age", "Social Interaction", "Key Parental Action", "Red Flag"]
col_x = [0.22, 1.62, 3.05, 6.45, 9.85]
col_w = [1.32, 1.35, 3.3, 3.3, 3.3]

# Header row
for h, cx, cw in zip(hdrs, col_x, col_w):
    rect(s, cx, 1.28, cw-0.04, 0.5, DEEP_TEAL)
    tb(s, cx+0.05, 1.31, cw-0.1, 0.44, h, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rows = [
    ("1. Unoccupied",  "0–3 mo",  "None — random movement",       "Face-time; tummy time; narrate",            "No social smile by 8 wks"),
    ("2. Solitary",    "0–2 yr",  "None — self-absorbed",          "Safe environment; respect focus",           "Rigid solitary after age 3"),
    ("3. Onlooker",    "2–2.5 yr","Watches, asks — does not join", "Allow observation; do not force entry",     "No peer interest by 3 yr"),
    ("4. Parallel",    "2–3 yr",  "Nearby, no interaction",        "Arrange proximity; no forced sharing",      "No peer awareness at 2.5"),
    ("5. Associative", "3–4 yr",  "Interacts, shares, no goal",    "Teach turn-taking; small groups",           "No peer exchange at 3.5"),
    ("6. Cooperative", "4+ yr",   "Organised, roles & rules",      "Protect free play; model sportsmanship",    "Cannot follow rules at 5"),
]

alt = [GRAY_BG, WHITE]
for i, (stage, age, soc, par, flag) in enumerate(rows):
    y = 1.88 + i * 0.84
    rc = alt[i % 2]
    for cx, cw in zip(col_x, col_w):
        rect(s, cx, y, cw-0.04, 0.78, rc)
    tb(s, col_x[0]+0.05, y+0.1, col_w[0]-0.1, 0.6, stage, 12, bold=True, color=S_COLORS[i])
    tb(s, col_x[1]+0.05, y+0.1, col_w[1]-0.1, 0.6, age, 12, bold=True, color=ORANGE)
    tb(s, col_x[2]+0.05, y+0.1, col_w[2]-0.1, 0.6, soc, 12, color=DARK)
    tb(s, col_x[3]+0.05, y+0.1, col_w[3]-0.1, 0.6, par, 12, color=DARK)
    tb(s, col_x[4]+0.05, y+0.1, col_w[4]-0.1, 0.6, flag, 11, italic=True, color=RED_TEXT)

source_note(s, "Parten MB. 1932; Kaplan & Sadock's Synopsis of Psychiatry 12th ed. — Preschool Developmental Milestones")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 11  —  PARENTAL ROLES ACROSS STAGES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "The Parent's Evolving Role Across Parten's Stages",
       "Parental involvement shifts from active partner to facilitator as the child gains social competence")

roles = [
    ("RESPONDER\nStages 1–2", S_COLORS[0],
     ["Be physically present", "Respond to every signal", "Narrate and sing", "Provide safe sensory-rich environment", "Avoid intrusion into focused solitary play"]),
    ("OBSERVER\nStage 3", S_COLORS[2],
     ["Sit nearby without directing", "Validate what child is watching", "Create opportunities to observe peers", "Do NOT force entry into groups", "Reassure parents this is healthy"]),
    ("FACILITATOR\nStage 4", S_COLORS[3],
     ["Arrange play dates", "Provide duplicate toys", "Do NOT enforce sharing prematurely", "Narrate parallel activity positively", "Gradually reduce space between peers"]),
    ("COACH\nStage 5", S_COLORS[4],
     ["Teach turn-taking explicitly", "Model sharing language", "Intervene in aggression only", "Encourage small group activities", "Observe for social exclusion"]),
    ("SUPPORTER\nStage 6", S_COLORS[5],
     ["Protect unstructured play time", "Model sportsmanship", "Advocate for recess", "Allow natural conflict resolution", "Limit over-scheduled activities"]),
]

col_w2 = 2.48
for i, (title, col, pts) in enumerate(roles):
    x = 0.28 + i * 2.62
    rect(s, x, 1.35, col_w2, 5.55, GRAY_BG)
    rect(s, x, 1.35, col_w2, 0.82, col)
    tb(s, x+0.06, 1.38, col_w2-0.1, 0.74, title, 13, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    for j, pt in enumerate(pts):
        tb(s, x+0.14, 2.28 + j*0.88, col_w2-0.22, 0.78,
           "▸ " + pt, 12, color=DARK)

source_note(s, "Schneider M et al. 2022 (PMID 35586226): Parent-child play and externalizing/internalizing behaviour — Systematic Review.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 12  —  PLAY & ATTACHMENT
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Play and Attachment: The Secure Base for All Stages",
       "Secure attachment enables richer, more complex play across every Parten stage")

rect(s, 0.3, 1.35, 7.9, 5.5, LIGHT_TEAL)
tb(s, 0.45, 1.43, 7.6, 0.42, "How Attachment Underpins Each Play Stage", 17, bold=True, color=DEEP_TEAL)

attach = [
    ("Stages 1–2: Secure attachment", "→ Infant dares to explore independently; solitary play is richer"),
    ("Stage 3: Onlooker play",         "→ Child uses parent as safe base before observing peers"),
    ("Stage 4: Parallel play",          "→ Child tolerates proximity to peers when parent is nearby"),
    ("Stage 5: Associative play",       "→ Emotional regulation during sharing disputes requires secure base"),
    ("Stage 6: Cooperative play",       "→ Child can leave parent, join group, and repair social ruptures"),
]
for i, (cause, effect) in enumerate(attach):
    y = 1.95 + i * 0.9
    rect(s, 0.4, y, 4.0, 0.75, DEEP_TEAL)
    tb(s, 0.5, y+0.08, 3.9, 0.62, cause, 12, bold=True, color=WHITE)
    tb(s, 4.52, y+0.1, 3.5, 0.62, effect, 12, color=DARK)

# Right panel
rect(s, 8.45, 1.35, 4.6, 5.5, RED_SOFT)
tb(s, 8.58, 1.43, 4.35, 0.42, "Attachment Red Flags in Play", 15, bold=True, color=RED_TEXT)
warns = [
    "Never uses parent as safe base",
    "No checking back during exploration",
    "Indiscriminate play with strangers",
    "Hypervigilance; cannot enter play",
    "No pleasure or affect during play",
    "Aggression that ruptures play",
    "Chaotic / frozen play themes",
    "No repair after play disruption",
]
for i, w in enumerate(warns):
    tb(s, 8.58, 1.97 + i*0.57, 4.3, 0.5, "⚠ " + w, 12, color=RED_TEXT)

source_note(s, "Kaplan & Sadock Comprehensive Textbook — Infant & Toddler Mental Status Examination, Section X: Relatedness & Attachment Behaviours")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 13  —  SCREEN TIME vs PLAY
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Screens vs. Play: What to Tell Parents",
       "Every screen hour is a missed play stage advancement hour")

rect(s, 0.3, 1.35, 5.9, 5.6, LIGHT_TEAL)
tb(s, 0.45, 1.43, 5.6, 0.42, "AAP Screen Time Guidelines", 17, bold=True, color=DEEP_TEAL)

guide = [
    ("< 18 months", "Video-chat only (Stages 1–2 must be screen-free)"),
    ("18–24 months", "High-quality only; co-view and discuss (Stage 2–3)"),
    ("2–5 years",    "Max 1 hr/day high-quality; always co-view (Stages 3–5)"),
    ("6+ years",     "Consistent limits; screens must not displace free play, sleep, or physical activity"),
]
yg = 1.95
for age_g, rec in guide:
    rect(s, 0.4, yg, 1.7, 0.75, ORANGE)
    tb(s, 0.42, yg+0.08, 1.66, 0.62, age_g, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 2.22, yg+0.08, 3.8, 0.65, rec, 13, color=DARK)
    yg += 0.93

rect(s, 0.3, 5.62, 5.9, 1.22, GRAY_BG)
tb(s, 0.45, 5.68, 5.6, 0.4, "Evidence:", 13, bold=True, color=DEEP_TEAL)
tb(s, 0.45, 6.08, 5.6, 0.7,
   "Bal et al. 2024 (PMID 39724067): Screen time associated with delayed language and reduced executive function in systematic review (34 studies).",
   12, color=DARK)

rect(s, 6.45, 1.35, 6.6, 5.6, GREEN_SOFT)
tb(s, 6.6, 1.43, 6.3, 0.42, "Replace Screens With Stage-Appropriate Play", 16, bold=True, color=GREEN_DARK)

replacements = [
    ("Stages 1–2", "Tummy time, rattles, mirrors, board books, singing"),
    ("Stage 3",    "Observe playground play; sit at park; watch siblings"),
    ("Stage 4",    "Side-by-side playdough, sand-table, block corner"),
    ("Stage 5",    "Small group art/water/sensory play; sharing games"),
    ("Stage 6",    "Board games, outdoor group play, sport, drama"),
]
for i, (stage_r, act) in enumerate(replacements):
    rect(s, 6.52, 2.0 + i*0.9, 1.6, 0.75, S_COLORS[i])
    tb(s, 6.54, 2.0 + i*0.9, 1.58, 0.75, stage_r, 12, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 8.2, 2.06 + i*0.9, 4.7, 0.65, act, 13, color=DARK)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 14  —  RED FLAGS TABLE (clinical reference)
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Red Flags in Parten's Play Stages: Clinical Action Guide",
       "Early identification enables early intervention — act before the window closes")

rect(s, 0.25, 1.32, 12.83, 0.52, RED_TEXT)
for txt, cx, cw in zip(["Stage / Age", "Expected Play", "Red Flag", "Consider"],
                        [0.3, 2.05, 5.45, 9.55],
                        [1.65, 3.3, 4.0, 3.6]):
    tb(s, cx+0.05, 1.35, cw, 0.44, txt, 13, bold=True, color=WHITE)

rf_rows = [
    ("Unoccupied\n0–3 mo",    "Random movement; attends to faces",
     "No visual tracking; no social smile by 8 wks",
     "Hearing & vision screen; ophthalmology; paeds neuro"),
    ("Solitary\n3–18 mo",     "Object exploration; babbling; cause-effect",
     "No babbling by 12 mo; no object use; no pointing",
     "Hearing screen; ASD screen (M-CHAT-R at 18 mo); SLP"),
    ("Onlooker\n2–2.5 yr",    "Watches peers with interest",
     "No interest in other children; flat affect near peers",
     "ASD assessment; social anxiety; attachment eval"),
    ("Parallel\n2–3 yr",      "Plays near peers; imitates peers",
     "Unaware of peers; no imitation; distress at proximity",
     "ASD evaluation; sensory processing assessment"),
    ("Associative\n3–4 yr",   "Interacts, shares, talks during play",
     "No peer interaction; consistent aggression; exclusion",
     "ADHD; ODD; language disorder; social skills therapy"),
    ("Cooperative\n4+ yr",    "Group play with rules and roles",
     "Cannot follow game rules; no role-play; bullying/extreme aggression",
     "ADHD; autism; executive function assessment; CBT"),
]

alt2 = [GRAY_BG, WHITE]
for i, (stage_r, exp, flag, action) in enumerate(rf_rows):
    y = 1.93 + i * 0.82
    rc = alt2[i % 2]
    for cx, cw in zip([0.3, 2.05, 5.45, 9.55], [1.65, 3.3, 4.0, 3.6]):
        rect(s, cx, y, cw, 0.76, rc)
    tb(s, 0.35, y+0.06, 1.55, 0.66, stage_r, 11, bold=True, color=S_COLORS[i])
    tb(s, 2.1, y+0.06, 3.2, 0.66, exp, 11, color=DARK)
    tb(s, 5.5, y+0.06, 3.9, 0.66, flag, 11, bold=True, color=RED_TEXT)
    tb(s, 9.6, y+0.06, 3.45, 0.66, action, 10, italic=True, color=GRAY_TEXT)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 15  —  PARTEN + WELL-CHILD VISITS
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Integrating Parten's Framework into Well-Child Visits",
       "Anticipatory guidance: what to ask, what to assess, what to advise — at every visit")

rect(s, 0.25, 1.32, 12.83, 0.5, DEEP_TEAL)
for txt, cx, cw in zip(["Visit", "Expected Parten Stage", "Ask Parents", "Advise Parents"],
                        [0.3, 1.75, 4.55, 8.1],
                        [1.38, 2.68, 3.45, 5.1]):
    tb(s, cx+0.05, 1.35, cw, 0.42, txt, 13, bold=True, color=WHITE)

visit_rows = [
    ("2 month",  "Unoccupied (Stage 1)",
     "'Does baby track your face? Startle to sound?'",
     "Tummy time; talk/sing; NO screens; prompt responses to all cries"),
    ("6 month",  "Solitary (Stage 2)",
     "'Does baby reach for toys? Laugh during play?'",
     "Offer varied textures; floor play; continue reading aloud"),
    ("9 month",  "Solitary — peak (Stage 2)",
     "'Does baby play independently for a few minutes?'",
     "Safe zone for exploration; follow child's gaze; peek-a-boo games"),
    ("12 month", "Solitary → early Onlooker (2)",
     "'Does baby point? Watch other children?'",
     "Park visits for peer exposure; functional toys; limit screens"),
    ("18 month", "Onlooker/early Parallel (3–4)",
     "'Does child watch other children? Imitate them?'",
     "Play dates; M-CHAT-R; parallel play is normal — no forced sharing"),
    ("24 month", "Parallel (Stage 4)",
     "'Does child play near peers? Use 2-word phrases?'",
     "Arrange proximity; duplicate toys; reassure about sharing"),
    ("3 year",   "Parallel → Associative (4–5)",
     "'Does child interact at all with other children?'",
     "Preschool/nursery; turn-taking games; small groups"),
    ("4–5 year", "Associative → Cooperative (5–6)",
     "'Does child play in groups? Follow rules?'",
     "Board games; outdoor unstructured play; protect recess"),
]

alt3 = [GRAY_BG, WHITE]
for i, (visit, pstage, ask, advise) in enumerate(visit_rows):
    y = 1.9 + i * 0.64
    rc = alt3[i % 2]
    for cx, cw in zip([0.3, 1.75, 4.55, 8.1], [1.38, 2.68, 3.45, 5.0]):
        rect(s, cx, y, cw, 0.58, rc)
    tb(s, 0.35, y+0.06, 1.28, 0.48, visit, 12, bold=True, color=DEEP_TEAL)
    tb(s, 1.8, y+0.06, 2.58, 0.48, pstage, 11, color=S_COLORS[min(i, 5)])
    tb(s, 4.6, y+0.06, 3.35, 0.48, ask, 11, italic=True, color=DARK)
    tb(s, 8.15, y+0.06, 4.9, 0.48, advise, 11, color=GRAY_TEXT)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 16  —  SPECIAL POPULATIONS
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "Parten's Stages in Special Populations",
       "Developmental play stage may not match chronological age — adapt expectations accordingly")

pops = [
    ("Autism\nSpectrum Disorder", S_COLORS[0], [
        "Often plateau at solitary or parallel stage",
        "Onlooker play may be prolonged or absent",
        "Restricted, repetitive solitary play is a core marker",
        "Cooperative play develops later or needs explicit teaching",
        "ESDM, PRT, play-based therapy target each stage",
    ]),
    ("ADHD", S_COLORS[2], [
        "Short attention span disrupts sustained play stages",
        "Associative play breaks down due to impulsivity",
        "Rule violations → conflict in cooperative play",
        "Hyperactive children may over-run parallel play space",
        "Structured transitions between stages help",
    ]),
    ("Developmental\nDelay / GDD", S_COLORS[3], [
        "Expect play stage to lag 6–18 months behind chronological age",
        "Adapt expectations to developmental age, not chronological",
        "Play-based OT/SLP therapy targets each Parten stage",
        "Open-ended sensory play most accessible",
        "Celebrate each stage achieved at any age",
    ]),
    ("Trauma /\nACE Exposure", S_COLORS[4], [
        "Regression to earlier stages under stress",
        "Hypervigilance disrupts onlooker and parallel stages",
        "Repetitive re-enactment in solitary/associative play",
        "Cooperative play requires safety — trauma blocks it",
        "Trauma-focused play therapy (TF-CBT) by Parten stage",
    ]),
]

for i, (pop, col, pts) in enumerate(pops):
    x = 0.28 + i * 3.27
    rect(s, x, 1.35, 3.12, 5.7, GRAY_BG)
    rect(s, x, 1.35, 3.12, 0.72, col)
    tb(s, x+0.06, 1.38, 3.0, 0.66, pop, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    for j, pt in enumerate(pts):
        tb(s, x+0.15, 2.17 + j*0.93, 2.82, 0.82, "▸ " + pt, 13, color=DARK)

source_note(s, "Sandbank M et al. 2023 (PMID 37963634): Autism intervention meta-analysis of early childhood studies (Project AIM) — BMJ.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 17  —  KEY MESSAGES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, DEEP_TEAL)
rect(s, 0, 0, 13.333, 1.2, RGBColor(0x00, 0x3D, 0x4F))
rect(s, 0, 1.1, 13.333, 0.1, GOLD)
tb(s, 0, 0.08, 13.333, 0.72, "Key Take-Home Messages for Clinicians & Parents",
   30, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(s, 0, 0.76, 13.333, 0.38, "Parten's stages — practical pearls for every consultation",
   15, italic=True, color=RGBColor(0xCC, 0xE8, 0xEC), align=PP_ALIGN.CENTER)

msgs = [
    ("1", "Stages build on each other",   "Earlier stages persist — a 6-year-old still uses solitary play. None are ever 'outgrown'."),
    ("2", "Do not force the next stage",  "Forcing sharing before Parallel stage resolves creates conflict, not development."),
    ("3", "Onlooker play is real learning","It is cognitive rehearsal. Watching is how children prepare to join."),
    ("4", "Parallel play ≠ social failure","At 2.5 yrs it is the expected peak. Reassurance is the correct prescription."),
    ("5", "Parents are the play scaffold", "Their role evolves: responder → observer → facilitator → coach → supporter."),
    ("6", "Screens steal stage-advancement","Each Parten stage requires lived social experience — screens cannot provide it."),
    ("7", "Red flags demand timely action", "Stagnation at any stage beyond expected age is a signal. Screen, refer, intervene."),
]

for i, (num, title, body) in enumerate(msgs):
    row = i % 4
    col = i // 4
    x = 0.22 + col * 6.6
    y = 1.35 + row * 1.5
    if i < 7:
        rect(s, x, y, 6.3, 1.35, WHITE)
        rect(s, x, y, 0.58, 1.35, S_COLORS[min(i, 5)])
        tb(s, x, y, 0.58, 1.35, num, 22, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        tb(s, x+0.66, y+0.07, 5.48, 0.44, title, 15, bold=True, color=DEEP_TEAL)
        tb(s, x+0.66, y+0.54, 5.48, 0.72, body, 13, color=DARK)

rect(s, 0, 7.08, 13.333, 0.42, ORANGE)
tb(s, 0, 7.11, 13.333, 0.36,
   '"Play is the work of the child." — Maria Montessori  |  Parten (1932): The original social play framework',
   14, bold=True, color=WHITE, align=PP_ALIGN.CENTER, italic=True)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 18  —  REFERENCES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(blank)
bg(s, WHITE)
header(s, "References & Further Reading")

refs = [
    "1.  Parten MB. Social participation among pre-school children. J Abnorm Soc Psychol. 1932;27(3):243–269. [Original framework]",
    "2.  Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. — Developmental Milestones: Preschool Play Behaviour.",
    "3.  Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. — Section VIII: Play (Infant & Toddler Mental Status Examination).",
    "4.  American Academy of Pediatrics. 'The Power of Play: A Pediatric Role in Enhancing Development in Young Children.' Pediatrics 2018;142(3):e20182058.",
    "5.  Murray R et al. 'The Crucial Role of Recess in School: Policy Statement.' Pediatrics 2026. PMID 42107976.",
    "6.  Schneider M, Falkenberg I, Berger P. 'Parent-Child Play and Externalizing/Internalizing Behaviour Problems: A Systematic Review.' Front Psychol 2022. PMID 35586226.",
    "7.  Bal M et al. 'Screen time, language development, and executive function: A Systematic Review.' PLoS One 2024. PMID 39724067.",
    "8.  Sandbank M et al. 'Autism intervention meta-analysis of early childhood studies (Project AIM).' BMJ 2023. PMID 37963634.",
    "9.  Vygotsky LS. Mind in Society: The Development of Higher Psychological Processes. Harvard University Press, 1978.",
    "10. Piaget J. The Construction of Reality in the Child. Basic Books, 1954.",
]

for i, ref in enumerate(refs):
    tb(s, 0.4, 1.38 + i * 0.57, 12.55, 0.5, ref, 12, color=DARK)

rect(s, 0, 7.08, 13.333, 0.42, DEEP_TEAL)
tb(s, 0, 7.11, 13.333, 0.36,
   "Seminar designed for developmental pediatricians | Mixed audience: parents + clinicians | Duration: 60–90 minutes",
   12, color=WHITE, align=PP_ALIGN.CENTER, italic=True)


# ── SAVE ──────────────────────────────────────────────────────────────────
out = "/tmp/workspace/play-seminar/Parten_Stages_of_Play_Pediatrician_Seminar.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/play-seminar && python build_parten_pptx.py 2>&1

Running Command

ls -lh /tmp/workspace/play-seminar/*.pptx

Your revised seminar presentation is ready:

Parten Stages of Play Pediatrician Seminar

Presentation · PPTX


What's Inside (18 slides)

#SlideContent
1Title SlideParten's framework + pediatrician seminar theme
2Learning Objectives5 objectives for mixed clinician/parent audience
3Road Map OverviewVisual 6-stage progression with age ranges and social complexity axis
4Stage 1: Unoccupied0–3 months — random movement, no goal
5Stage 2: Solitary0–2 years — self-absorbed, independent play
6Stage 3: Onlooker2–2.5 years — watches peers, does not join
7Stage 4: Parallel2–3 years — alongside peers, no interaction
8Stage 5: Associative3–4 years — interacts and shares, no organised goal
9Stage 6: Cooperative4+ years — organised groups, roles, rules
10Quick-Reference TableAll 6 stages: social interaction, parental action, red flag
11Parent's Evolving RoleResponder → Observer → Facilitator → Coach → Supporter
12Play & AttachmentSecure base theory mapped to each Parten stage
13Screens vs. PlayAAP guidelines + stage-matched screen replacements
14Red Flags Action TableAge-specific flags + clinical actions per stage
15Well-Child Visit Integration2 month through 4–5 year visit guidance
16Special PopulationsASD, ADHD, GDD, Trauma — play stage adaptations
17Key Take-Home Messages7 clinical pearls (one per stage + one extra)
18ReferencesParten 1932 + Kaplan & Sadock + AAP + 4 PubMed studies
Each of the 6 stage slides uses a distinct colour per stage and includes: what the play looks like, parental implications, red flags, developmental link (Piaget/Vygotsky), and a clinical note.

Which is correct staging of play earlier you gave or stages I suggested

Both are correct — they describe different dimensions of play development and come from different theoretical frameworks. Neither replaces the other; a complete understanding uses both.

The Two Frameworks Compared

Your Suggested Stages (Parten, 1932)My Original Stages (Piaget + Clinical)
AuthorMildred PartenJean Piaget (+ clinical adaptation)
Dimension describedSocial participationwith whom the child playsCognitive/symbolichow the child plays
Axis of progressionSocial complexity (alone → cooperative)Cognitive complexity (sensorimotor → symbolic)
Primary useAssessing social development, peer interactionAssessing cognitive development, symbolic thinking

Why Both Matter for a Developmental Pediatrician

A child can be at different stages on each framework simultaneously — and that gap is clinically significant.

Example 1 — Classic ASD

  • Parten stage: Stuck at Solitary/Parallel (low social engagement)
  • Piaget stage: May reach Symbolic play (plays with toy cars appropriately)
  • Clinical meaning: Cognitive capacity is present, but social use of play is impaired → ASD signal

Example 2 — GDD

  • Parten stage: Parallel play (age-expected for 2.5 yr)
  • Piaget stage: Still at Sensorimotor (no symbolic play) at age 3
  • Clinical meaning: Social interest is intact, but symbolic/cognitive play is delayed → cognitive delay

Example 3 — Typically Developing Child

  • Both frameworks progress together in parallel

The Definitive Answer

QuestionAnswer
Which is the classic academic framework taught in child development?Parten's stages (Unoccupied → Cooperative)
Which is used in clinical/psychiatric assessment of cognition?Piaget's framework (Sensorimotor → Complex Symbolic)
Which is most useful for parent education?Parten — more intuitive, observable at home
Which is most useful for developmental surveillance?Both together — one assesses social, one assesses cognitive
Which is cited in Kaplan & Sadock's textbook?Piaget-based (Sensorimotor, Functional, Early Symbolic, Complex Symbolic)
Which is cited in the AAP play guidance?Both frameworks are referenced

For Your Seminar — Recommended Approach

Since your audience is developmental pediatricians + parents, the ideal structure is to use Parten as the main framework (as in the revised PPT) because:
  1. It is the universally recognised academic classification of play
  2. It maps directly to social development — your clinical lens
  3. Parents recognise it intuitively ("yes, my child watches but doesn't join")
Then mention Piaget's dimension briefly (Slide 3 or a callout box) to show that:
  • Social play stage and cognitive play stage can dissociate
  • That dissociation is your red flag detector for ASD vs. GDD vs. typical development
This is how the most clinically complete seminar would be structured — Parten as the spine, Piaget as the diagnostic tool.

I need ppt stating both and all above 4 follow up suggestions

Writing File

~/play-seminar/build_master_pptx.py


from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN
from io import BytesIO

# ── Palette ────────────────────────────────────────────────────────────────
DEEP_TEAL  = RGBColor(0x00, 0x5F, 0x73)
MED_TEAL   = RGBColor(0x00, 0x8B, 0x8B)
LT_TEAL    = RGBColor(0xD4, 0xEE, 0xF1)
ORANGE     = RGBColor(0xCA, 0x6F, 0x1E)
GOLD       = RGBColor(0xF0, 0xB2, 0x27)
WHITE      = RGBColor(0xFF, 0xFF, 0xFF)
DARK       = RGBColor(0x17, 0x20, 0x2A)
GRAY_BG    = RGBColor(0xF2, 0xF5, 0xF7)
GRAY_TXT   = RGBColor(0x5D, 0x6D, 0x7E)
RED_SOFT   = RGBColor(0xFD, 0xED, 0xEC)
RED_TXT    = RGBColor(0xA9, 0x19, 0x19)
GREEN_SOFT = RGBColor(0xE9, 0xF7, 0xEF)
GREEN_DRK  = RGBColor(0x1E, 0x6B, 0x35)
PURPLE     = RGBColor(0x6C, 0x35, 0x8C)
LT_PURPLE  = RGBColor(0xEE, 0xE6, 0xF5)
NAVY       = RGBColor(0x1A, 0x23, 0x5E)

# Parten colours
P_COL = [
    RGBColor(0x78, 0x28, 0x9C),  # 1 Unoccupied
    RGBColor(0x21, 0x6F, 0xAD),  # 2 Solitary
    RGBColor(0x0E, 0x85, 0x6E),  # 3 Onlooker
    RGBColor(0xCA, 0x6F, 0x1E),  # 4 Parallel
    RGBColor(0xB0, 0x3A, 0x2E),  # 5 Associative
    RGBColor(0x00, 0x5F, 0x73),  # 6 Cooperative
]
# Piaget colours
G_COL = [
    RGBColor(0x00, 0x70, 0xC0),  # Sensorimotor
    RGBColor(0x00, 0x97, 0x6A),  # Functional
    RGBColor(0xD4, 0x7B, 0x00),  # Early Symbolic
    RGBColor(0x8E, 0x24, 0xAA),  # Complex Symbolic
]

W = Inches(13.333)
H = Inches(7.5)
prs = Presentation()
prs.slide_width  = W
prs.slide_height = H
BL = prs.slide_layouts[6]

# ── Helpers ────────────────────────────────────────────────────────────────
def bg(slide, color):
    f = slide.background.fill; f.solid(); f.fore_color.rgb = color

def box(slide, l, t, w, h, color):
    sh = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    sh.fill.solid(); sh.fill.fore_color.rgb = color; sh.line.fill.background()
    return sh

def tb(slide, l, t, w, h, text, size, bold=False, italic=False,
       color=None, align=PP_ALIGN.LEFT, wrap=True):
    bx = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = bx.text_frame; tf.word_wrap = wrap
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = Pt(1)
    for i, ln in enumerate(str(text).split('\n')):
        p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
        p.alignment = align
        r = p.add_run(); r.text = ln
        r.font.size = Pt(size); r.font.bold = bold; r.font.italic = italic
        if color: r.font.color.rgb = color

def hdr(slide, title, sub=None):
    box(slide, 0, 0, 13.333, 1.22, DEEP_TEAL)
    box(slide, 0, 1.12, 13.333, 0.1, GOLD)
    tb(slide, 0.35, 0.07, 12.6, 0.72, title, 30, bold=True, color=WHITE)
    if sub:
        tb(slide, 0.35, 0.76, 12.6, 0.38, sub, 13, italic=True,
           color=RGBColor(0xCC,0xE8,0xEC))

def badge(slide, l, t, text, color, w=2.2, h=0.46):
    box(slide, l, t, w, h, color)
    tb(slide, l, t, w, h, text, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

def rfbar(slide, text, y=5.38):
    box(slide, 0.28, y, 12.8, 0.7, RED_SOFT)
    tb(slide, 0.4, y+0.05, 12.55, 0.6, "🚩 Red Flags: " + text, 12, color=RED_TXT)

def note(slide, text, y=7.1):
    tb(slide, 0.3, y, 12.7, 0.38, text, 10, italic=True, color=GRAY_TXT)

def panel(slide, l, t, w, h, title, items, bg_c, tc=DEEP_TEAL, fs=13):
    box(slide, l, t, w, h, bg_c)
    tb(slide, l+0.14, t+0.1, w-0.22, 0.4, title, 15, bold=True, color=tc)
    for i, it in enumerate(items):
        tb(slide, l+0.2, t+0.58+i*0.44, w-0.3, 0.4, "▸ "+it, fs, color=DARK)


# ══════════════════════════════════════════════════════════════════════════
# SECTION DIVIDER helper
# ══════════════════════════════════════════════════════════════════════════
def section_divider(prs, section_num, title, subtitle, color):
    s = prs.slides.add_slide(BL)
    bg(s, color)
    box(s, 0, 3.2, 13.333, 0.12, GOLD)
    tb(s, 0.5, 1.1, 12.3, 0.8,
       f"SECTION {section_num}", 22, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
    tb(s, 0.5, 2.0, 12.3, 1.1, title, 42, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 0.5, 3.45, 12.3, 0.8, subtitle, 20, italic=True,
       color=RGBColor(0xCC,0xE8,0xEC), align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 1 — MASTER TITLE
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, DEEP_TEAL)
box(s, 1.1, 1.1, 11.1, 5.3, WHITE)
box(s, 1.1, 1.1, 11.1, 0.1, GOLD)
box(s, 1.1, 6.3, 11.1, 0.1, GOLD)

tb(s, 1.3, 1.3, 10.7, 0.95,
   "Developmental Stages of Play", 38, bold=True,
   color=DEEP_TEAL, align=PP_ALIGN.CENTER)
tb(s, 1.3, 2.35, 10.7, 0.65,
   "Parten's Social Stages + Piaget's Cognitive Stages", 22,
   bold=True, color=PURPLE, align=PP_ALIGN.CENTER)
tb(s, 1.3, 3.08, 10.7, 0.5,
   "Parental Implications  ·  Red Flags  ·  Clinical Syndromes  ·  Screen Time  ·  Special Populations",
   15, italic=True, color=GRAY_TXT, align=PP_ALIGN.CENTER)
box(s, 3.6, 3.72, 6.1, 0.07, GOLD)
tb(s, 1.3, 3.88, 10.7, 0.45,
   "A Comprehensive Seminar for Developmental Pediatricians", 17,
   color=DARK, align=PP_ALIGN.CENTER)
tb(s, 1.3, 4.38, 10.7, 0.38,
   "Mixed Audience: Clinicians & Parents  |  60–90 Minutes  |  July 2026",
   14, italic=True, color=GRAY_TXT, align=PP_ALIGN.CENTER)

box(s, 0, 6.8, 13.333, 0.7, ORANGE)
tb(s, 0, 6.84, 13.333, 0.45,
   '"Play is the highest form of research." — Einstein  |  "The work of the child." — Montessori',
   14, bold=True, italic=True, color=WHITE, align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 2 — LEARNING OBJECTIVES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Learning Objectives",
    "By the end of this seminar participants will be able to:")

objs = [
    "Describe Parten's 6 social play stages AND Piaget's 4 cognitive play stages",
    "Explain how the two frameworks are complementary — and how their dissociation is your diagnostic tool",
    "Identify parental behaviours that support each play stage",
    "Recognise red flags for developmental delay based on play patterns",
    "Apply the triad GDD + Ptosis + ASD to a syndromic differential diagnosis",
    "Integrate play guidance into anticipatory counselling at every well-child visit",
]
for i, obj in enumerate(objs):
    y = 1.38 + i * 0.98
    box(s, 0.48, y, 12.38, 0.82, LT_TEAL)
    box(s, 0.48, y, 0.54, 0.82, DEEP_TEAL)
    tb(s, 0.48, y, 0.54, 0.82, str(i+1), 17, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 1.1, y+0.13, 11.6, 0.6, obj, 16, color=DARK)

note(s, "Frameworks: Parten 1932 (social); Piaget 1954 (cognitive); AAP 2018 Play Policy; Kaplan & Sadock 12th ed.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 1 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 1,
    "Parten's 6 Social Stages of Play",
    "Unoccupied  →  Solitary  →  Onlooker  →  Parallel  →  Associative  →  Cooperative",
    P_COL[5])


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 4 — PARTEN OVERVIEW
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Parten's 6 Social Stages: Road Map",
    "Social complexity increases with age — earlier stages persist alongside later ones")

names = ["1\nUnoccupied","2\nSolitary","3\nOnlooker","4\nParallel","5\nAssociative","6\nCooperative"]
ages  = ["0–3 mo","0–2 yr","2–2.5 yr","2–3 yr","3–4 yr","4+ yr"]
descs = [
    "Random moves\nno clear goal",
    "Plays alone\nself-absorbed",
    "Watches peers\ndoes not join",
    "Near others\nno interaction",
    "Shares/talks\nno group goal",
    "Roles & rules\nshared outcome",
]
bw = 1.98
for i in range(6):
    x = 0.28 + i*2.13
    box(s, x, 1.35, bw, 4.75, GRAY_BG)
    box(s, x, 1.35, bw, 0.78, P_COL[i])
    tb(s, x+0.05, 1.37, bw-0.08, 0.48, names[i], 13, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, x+0.05, 1.82, bw-0.08, 0.3, ages[i], 11,
       color=WHITE, align=PP_ALIGN.CENTER, italic=True)
    tb(s, x+0.1, 2.22, bw-0.16, 0.9, descs[i], 13,
       color=DARK, align=PP_ALIGN.CENTER)
    # arrow
    if i < 5:
        tb(s, x+bw+0.05, 3.5, 0.2, 0.35, "►", 14, color=GRAY_TXT)

box(s, 0.28, 6.17, 12.77, 0.3, LT_TEAL)
tb(s, 0.32, 6.19, 12.7, 0.26,
   "◄── Increasing Social Complexity  |  Increasing Age  |  Earlier stages co-exist with later stages ──►",
   11, color=DEEP_TEAL, align=PP_ALIGN.CENTER)
note(s, "Parten MB. 1932. Social participation among pre-school children. J Abnorm Soc Psychol;27(3):243–269.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDES 5–10 — 6 Parten stages (one each)
# ══════════════════════════════════════════════════════════════════════════
parten_data = [
    (1,"Unoccupied Play","Birth – 3 months",P_COL[0],
     ["Random, unplanned body movements — no clear goal",
      "Gazes at objects/faces briefly without engagement",
      "Vocalises randomly — not directed at anyone",
      "Pauses when something catches attention",
      "Foundation of ALL future play"],
     ["Maximise face-to-face interaction: smile, talk, sing",
      "Tummy time from Day 1 — sensory & motor wiring",
      "High-contrast patterns; mobile above the cot",
      "Respond promptly to every coo — building secure attachment",
      "Narrate your actions: 'I'm picking you up now'",
      "Zero screens — unoccupied play IS active brain work"],
     "No social smile by 6–8 wks | No visual tracking by 8 wks | No startle to sound | Absent spontaneous movement",
     "Piaget Sensorimotor Sub-stage 1: reflex schemas. Even 'random' movement builds circuits for all later play.",
     "Persists as dominant style in severe ID or profoundly autistic children."),
    (2,"Solitary Independent Play","Birth – 2 years (peak 0–18 months)",P_COL[1],
     ["Plays alone, completely absorbed in own activity",
      "Does not notice or invite other children",
      "Mouths → bangs → drops → stacks → pretend (progression)",
      "Object exploration: rattles, cause-effect, stacking",
      "Healthy dominant mode up to 18 months"],
     ["Respect the child's self-directed focus",
      "Provide a safe, rich environment for independent exploration",
      "Sit nearby as silent 'safe base' without intruding",
      "Offer open-ended objects: cups, blocks, spoons",
      "Narrate from a distance: 'You're building a tower!'",
      "Solitary play in toddlers is NORMAL — reassure parents"],
     "Persistent rigid solitary play after age 3 | Only one object/topic | No functional object use by 15 mo",
     "Builds executive function (self-direction), fine motor, and cognitive schema formation.",
     "Stereotyped, restricted solitary play resisting any social engagement after age 3 is a core ASD signal."),
    (3,"Onlooker (Spectator) Play","2 – 2½ years",P_COL[2],
     ["Watches other children play with definite interest",
      "Stands/sits within speaking distance — observes, does not join",
      "May ask questions or comment to playing children",
      "Active, attentive observing — not passive disinterest",
      "A bridge stage between solitary and parallel"],
     ["Do NOT force entry — this stage is developmentally essential",
      "Validate: 'You're watching how they build, aren't you?'",
      "Position child where peers are visible but not overwhelming",
      "Allow observation time before a play date",
      "Do not label onlooker children as 'shy' or 'antisocial'",
      "Shy/anxious children use this stage extensively"],
     "Persistent onlooker after 3 years with zero attempt to join | No eye contact with playing peers | Flat affect while watching",
     "Cognitive rehearsal: child processes social rules, turn-taking, and group norms before attempting participation. Vygotsky's ZPD.",
     "Frequently misinterpreted by parents as a problem. Main clinical intervention: reassurance."),
    (4,"Parallel Play","2 – 3 years",P_COL[3],
     ["Plays independently but alongside other children",
      "Uses similar toys — may mimic nearby child's actions",
      "Aware of the other child but does not engage",
      "Classic: two toddlers at a sand-table, both digging, not together",
      "First step in peer socialisation"],
     ["Arrange play dates — proximity is the goal, not interaction",
      "Do NOT demand sharing at this stage — developmentally premature",
      "Provide duplicate toys so both can 'do the same thing'",
      "Praise proximity: 'You and Lena are both building!'",
      "Reassure parents: parallel play is healthy and age-appropriate",
      "Gradually bring children physically closer over visits"],
     "No awareness of other children by 2.5 yr | Distress at proximity to peers | No imitation of peers",
     "Early social awareness without yet having the cognitive capacity for joint interaction. Documented in K&S Synopsis as the normal mode at 2.5–3 yr.",
     "Forcing cooperative play at this age creates unnecessary parent-child conflict. Educate parents explicitly."),
    (5,"Associative Play","3 – 4 years",P_COL[4],
     ["Children interact, share materials, and talk about the activity",
      "No organised goal, leader, or structure to the group",
      "Each child still pursues their own agenda within the shared activity",
      "Borrowing/lending toys; commenting on what others are doing",
      "Classic: group at playdough table — talking, sharing, no set plan"],
     ["Encourage small group activities: art corner, water play, playdough",
      "Teach turn-taking explicitly: 'First Maya, then you'",
      "Model sharing language: 'Can I use that when you're done?'",
      "Do not impose a leader — let interaction be organic",
      "Observe for children consistently excluded — early social difficulty",
      "Use play narratives to build vocabulary and emotional language"],
     "No peer interaction by age 3.5 | Aggression when another child uses same materials | No turn-taking",
     "Develops theory of mind foundations, negotiation skills, and pragmatic language. Disagreements here are productive.",
     "Children stalled in solitary/parallel after 3.5 yr benefit from social skills groups and SLP targeting pragmatics."),
    (6,"Cooperative Play","4 years and beyond",P_COL[5],
     ["Organised group play with shared goal, roles, and rules",
      "Children negotiate: 'I'm the doctor, you're the patient'",
      "Group has a product/outcome: a building, a game won",
      "Turn-taking, rule enforcement, conflict resolution all present",
      "Dramatic play, board games, team sports — all qualify"],
     ["Teach sportsmanship: how to win AND how to lose",
      "Introduce board games and card games (ages 4–5)",
      "Allow natural conflict resolution before intervening",
      "Protect unstructured outdoor play — recess is irreplaceable (AAP 2026)",
      "Limit over-scheduling of structured activities",
      "Monitor for bullying and exclusion — these emerge here"],
     "Cannot follow rules of simple games by age 5 | Consistent exclusion from peer groups | Severe aggression when losing",
     "Requires Piagetian concrete operational thinking, theory of mind, executive function, and emotional regulation.",
     "AAP 2026 Recess Policy (PMID 42107976): recess improves attention, executive function, social-emotional learning, and academic achievement."),
]

for num,name,age,col,what,impl,flags,devlink,clinnote in parten_data:
    s = prs.slides.add_slide(BL)
    bg(s, WHITE)
    hdr(s, f"Parten Stage {num}: {name}", f"{age}  —  Social Dimension of Play")
    badge(s, 0.28, 1.35, age, col, w=2.3)
    panel(s, 0.28, 1.93, 6.0, 3.25, "What Play Looks Like", what, LT_TEAL, col)
    panel(s, 6.5, 1.93, 6.55, 3.25, "Parental Implications", impl,
          RGBColor(0xFF,0xF6,0xE8), ORANGE)
    rfbar(s, flags, y=5.32)
    box(s, 0.28, 6.1, 12.8, 1.05, GRAY_BG)
    tb(s, 0.4, 6.14, 2.4, 0.25, "Dev Link:", 10, bold=True, color=DEEP_TEAL)
    tb(s, 0.4, 6.35, 6.1, 0.72, devlink, 11, italic=True, color=DARK)
    tb(s, 6.65, 6.14, 6.3, 0.98, "📋 "+clinnote, 11, color=GRAY_TXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════
# SECTION 2 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 2,
    "Piaget's 4 Cognitive Stages of Play",
    "Sensorimotor  →  Functional  →  Early Symbolic  →  Complex Symbolic",
    PURPLE)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 12 — PIAGET OVERVIEW
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Piaget's 4 Cognitive Play Stages: Road Map",
    "Measures the cognitive complexity of play — what the child does with objects and ideas")

piaget_names  = ["Sensorimotor\nPlay","Functional\nPlay","Early Symbolic\nPlay","Complex Symbolic\nPlay"]
piaget_ages   = ["0–12 months","12–18 months","18 months – 3 yr","30 months+"]
piaget_desc   = [
    "Learning through\nthe senses & body\n(mouthing, banging)",
    "Objects used\nfor their function\n(comb to hair)",
    "Pretend with body;\none object represents\nanother",
    "Dramatic sequences;\nimaginary objects;\nassigns roles to others",
]
piaget_link   = [
    "Piaget\nSensorimotor\nStage",
    "Object permanence;\ncause-effect\nunderstanding",
    "Pre-operational\nthought; emerging\nlanguage",
    "Advanced symbolic\nthought; Theory\nof Mind begins",
]

bw2 = 2.98
for i in range(4):
    x = 0.28 + i*3.27
    box(s, x, 1.35, bw2, 5.15, GRAY_BG)
    box(s, x, 1.35, bw2, 0.78, G_COL[i])
    tb(s, x+0.06, 1.37, bw2-0.1, 0.48, piaget_names[i], 14, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, x+0.06, 1.82, bw2-0.1, 0.28, piaget_ages[i], 12,
       color=WHITE, align=PP_ALIGN.CENTER, italic=True)
    tb(s, x+0.1, 2.2, bw2-0.16, 1.1, piaget_desc[i], 13,
       color=DARK, align=PP_ALIGN.CENTER)
    box(s, x+0.12, 3.5, bw2-0.22, 0.08, G_COL[i])
    tb(s, x+0.1, 3.68, bw2-0.16, 0.9, piaget_link[i], 12,
       color=GRAY_TXT, align=PP_ALIGN.CENTER, italic=True)
    if i < 3:
        tb(s, x+bw2+0.05, 3.7, 0.2, 0.35, "►", 14, color=GRAY_TXT)

box(s, 0.28, 6.6, 12.77, 0.3, LT_PURPLE)
tb(s, 0.32, 6.62, 12.7, 0.26,
   "◄── Increasing Cognitive Complexity  |  Increasing Age  |  Source: Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. ──►",
   11, color=PURPLE, align=PP_ALIGN.CENTER)
note(s, "Kaplan & Sadock's Synopsis of Psychiatry 12th ed. — Developmental Milestones; K&S Comprehensive Textbook — Section VIII: Play")


# ══════════════════════════════════════════════════════════════════════════
# SLIDES 13–16 — 4 Piaget stages (one each)
# ══════════════════════════════════════════════════════════════════════════
piaget_data = [
    ("Sensorimotor Play","0 – 12 months",G_COL[0],
     ["Mouthing, banging, shaking, dropping objects",
      "Exploring moving parts — poking, pulling, rotating",
      "Peek-a-boo; sound imitation games with caregiver",
      "Social smile (6 wks); laughter (4 mo)",
      "Object permanence emerging (8–12 mo)"],
     ["Floor time: supervised tummy time from Day 1",
      "Talk, sing, narrate every action — language wiring starts NOW",
      "Offer rattles, textured toys, safe mirrors",
      "Respond promptly to vocalisations — secure attachment begins",
      "Peek-a-boo is the first 'object permanence' game",
      "No screens (< 18 months per AAP)"],
     "No social smile by 3 mo | No babbling by 12 mo | Not reaching for objects | No response to name by 9 mo",
     "Piaget Stage 1 (0–2yr): all learning flows from sensory experience and motor action.",
     "Source: K&S Comprehensive Textbook — Infant & Toddler Mental Status Exam, Section VIII."),
    ("Functional Play","12 – 18 months",G_COL[1],
     ["Pushes toy car, touches comb to hair, holds phone to ear",
      "Stacks blocks, bangs drum with intent",
      "Imitates household actions: sweeping, stirring",
      "10–12 words by 12 months",
      "Proto-declarative pointing (shares interest)"],
     ["Name objects during play: 'That's a cup — we drink from it!'",
      "Allow safe exploration — child-proof rather than restrict",
      "Follow the child's lead (child-directed play)",
      "Read board books daily — point and name",
      "Encourage imitation games: clapping, waving",
      "Let child problem-solve before offering help"],
     "No single words by 16 mo | Not imitating actions | No pointing by 14 mo | No functional use of objects",
     "Object permanence + early cause-effect understanding. Precursor to symbolic representation.",
     "Functional play that is restricted to only one object/action type, and resists all variation, is an early ASD flag."),
    ("Early Symbolic Play","18 months – 3 years",G_COL[2],
     ["Pretends to eat or sleep using own body",
      "'Feeds' doll or mother — uses other as agent",
      "A block becomes a car — object substitution",
      "Sequences activities: 'cook then eat'",
      "Imaginary play beginning"],
     ["Join in pretend play: take a cup of 'tea'",
      "Supply open-ended toys: dolls, blocks, play kitchen",
      "Narrate what child does: 'Your baby is hungry!'",
      "Limit screens: 18–24 mo children learn from people, not screens",
      "Use play to prepare for transitions: 'Let's pretend we go to the doctor'",
      "Do not correct the 'logic' of pretend play"],
     "No pretend play by 18 mo | No two-word phrases by 24 mo | Stereotyped/repetitive play only",
     "Pre-operational thought (Piaget). Symbol formation — the foundation of language and literacy.",
     "Absence of pretend play at 18 months is one of the M-CHAT-R's strongest ASD predictors."),
    ("Complex Symbolic / Dramatic Play","30 months – 5 years",G_COL[3],
     ["Plans and acts out dramatic play sequences",
      "Uses imaginary objects (invisible tea, pretend fire)",
      "Assigns roles to others: 'You be the patient'",
      "Develops narrative arcs: beginning-middle-end",
      "Imaginary companions (up to 50% of children 3–10 yr)"],
     ["Participate without taking over — be a supporting character",
      "Ask open questions: 'What happens next in your story?'",
      "Accept imaginary companions — developmentally healthy",
      "Provide dress-up clothes, puppets, art materials",
      "Use play to process fears and transitions",
      "Read narrative picture books — expands play vocabulary"],
     "No complex pretend by 36 mo | Cannot take on another's role | Cannot sequence 3-step scenarios | Rigid solitary play",
     "Advanced symbolic thought; Theory of Mind beginning. Doll/animal play reveals themes of family life.",
     "K&S Comprehensive: child's doll play can reveal re-enactment, fears, and fantasy — interpret with caution."),
]

for name,age,col,what,impl,flags,devlink,clinnote in piaget_data:
    s = prs.slides.add_slide(BL)
    bg(s, WHITE)
    hdr(s, f"Piaget: {name}", f"{age}  —  Cognitive Dimension of Play")
    badge(s, 0.28, 1.35, age, col, w=2.5)
    panel(s, 0.28, 1.93, 6.0, 3.25, "What Play Looks Like", what, LT_PURPLE, col)
    panel(s, 6.5, 1.93, 6.55, 3.25, "Parental Implications", impl,
          RGBColor(0xFF,0xF6,0xE8), ORANGE)
    rfbar(s, flags, y=5.32)
    box(s, 0.28, 6.1, 12.8, 1.05, GRAY_BG)
    tb(s, 0.4, 6.14, 2.4, 0.25, "Dev Link:", 10, bold=True, color=PURPLE)
    tb(s, 0.4, 6.35, 6.1, 0.72, devlink, 11, italic=True, color=DARK)
    tb(s, 6.65, 6.14, 6.3, 0.98, "📋 "+clinnote, 11, color=GRAY_TXT, italic=True)


# ══════════════════════════════════════════════════════════════════════════
# SECTION 3 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 3,
    "Integrating Both Frameworks",
    "How Parten + Piaget work together as your clinical diagnostic tool",
    NAVY)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 18 — FRAMEWORK COMPARISON
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Parten vs. Piaget: Two Lenses, One Child",
    "Each framework answers a different clinical question — use both together")

# Two column boxes
box(s, 0.28, 1.35, 6.1, 5.55, LT_TEAL)
box(s, 0.28, 1.35, 6.1, 0.6, DEEP_TEAL)
tb(s, 0.35, 1.38, 5.9, 0.52, "Parten's Framework  (Social Dimension)", 16,
   bold=True, color=WHITE)
box(s, 6.55, 1.35, 6.5, 5.55, LT_PURPLE)
box(s, 6.55, 1.35, 6.5, 0.6, PURPLE)
tb(s, 6.62, 1.38, 6.3, 0.52, "Piaget's Framework  (Cognitive Dimension)", 16,
   bold=True, color=WHITE)

p_rows = [
    ("Author","Mildred Parten, 1932"),
    ("Question answered","WITH WHOM does the child play?"),
    ("Axis","Social complexity (alone → cooperative)"),
    ("Stages","Unoccupied → Solitary → Onlooker →\nParallel → Associative → Cooperative"),
    ("Primary use","Assessing social development & peer interaction"),
    ("Best for","Parent education; social red flags"),
    ("Classic source","Child development & social psychology"),
]
g_rows = [
    ("Author","Jean Piaget, 1954"),
    ("Question answered","HOW does the child use objects/ideas?"),
    ("Axis","Cognitive complexity (sensorimotor → symbolic)"),
    ("Stages","Sensorimotor → Functional →\nEarly Symbolic → Complex Symbolic"),
    ("Primary use","Assessing cognitive/symbolic development"),
    ("Best for","Developmental surveillance; cognitive red flags"),
    ("Classic source","K&S Comprehensive Textbook, 11th ed."),
]
for i,(label,val) in enumerate(p_rows):
    y = 2.05 + i*0.72
    tb(s, 0.38, y, 1.75, 0.62, label+":", 12, bold=True, color=DEEP_TEAL)
    tb(s, 2.18, y, 4.05, 0.62, val, 12, color=DARK)
for i,(label,val) in enumerate(g_rows):
    y = 2.05 + i*0.72
    tb(s, 6.65, y, 1.75, 0.62, label+":", 12, bold=True, color=PURPLE)
    tb(s, 8.45, y, 4.45, 0.62, val, 12, color=DARK)

note(s, "Key principle: Both frameworks are valid and complementary. Neither replaces the other. Use together for maximum diagnostic power.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 19 — COMBINED DISSOCIATION TABLE (the diagnostic power slide)
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "The Diagnostic Power: When Parten and Piaget Dissociate",
    "The gap between social stage and cognitive stage is your clinical signal")

# Header row
for txt, cx, cw, col in [
    ("Child Profile", 0.28, 2.8, DARK),
    ("Parten Stage\n(Social)", 3.18, 2.5, DEEP_TEAL),
    ("Piaget Stage\n(Cognitive)", 5.78, 2.5, PURPLE),
    ("Dissociation?", 8.38, 1.6, ORANGE),
    ("Clinical Meaning", 10.08, 3.1, RED_TXT),
]:
    box(s, cx, 1.32, cw-0.06, 0.62, GRAY_BG)
    tb(s, cx+0.06, 1.34, cw-0.12, 0.58, txt, 13, bold=True, color=col, align=PP_ALIGN.CENTER)

rows = [
    ("Typical 3-yr-old",
     "Parallel/early\nAssociative", "Early Symbolic", "None",
     "Normal development — both frameworks in step", WHITE),
    ("ASD (high-functioning)\n3 yr old",
     "Solitary / Parallel\n(stuck)", "Symbolic or higher", "YES — Social lags",
     "Cognitive capacity intact but social use of play impaired → ASD signal", RED_SOFT),
    ("GDD (no ASD)\n3 yr old",
     "Parallel / early\nAssociative (age-appropriate)", "Sensorimotor or Functional\n(delayed)", "YES — Cognitive lags",
     "Social interest intact; cognitive/symbolic play delayed → GDD", RED_SOFT),
    ("ASD + GDD\n(e.g. KAT6A syndrome)",
     "Solitary (rigid,\nstereotyped)", "Sensorimotor or\nFunctional only", "BOTH lag",
     "Both social and cognitive play impaired — syndromic workup indicated", RGBColor(0xFF,0xEB,0xEE)),
    ("Language Disorder\n(DLD) 3.5 yr old",
     "Parallel → Associative\n(age-appropriate)", "Early Symbolic\n(age-appropriate)", "None",
     "Play is typically normal — language alone is affected", GRAY_BG),
    ("Typically Developing\n4-yr-old",
     "Associative/\nCooperative", "Complex Symbolic", "None",
     "Both frameworks at expected level — reassure", WHITE),
]
for i,(prof,parten,piaget,diss,meaning,rc) in enumerate(rows):
    y = 2.03 + i*0.82
    for cx,cw in [(0.28,2.8),(3.18,2.5),(5.78,2.5),(8.38,1.6),(10.08,3.1)]:
        box(s, cx, y, cw-0.06, 0.76, rc)
    tb(s, 0.35, y+0.06, 2.65, 0.66, prof, 11, bold=True, color=DARK)
    tb(s, 3.25, y+0.06, 2.37, 0.66, parten, 11, color=DEEP_TEAL, align=PP_ALIGN.CENTER)
    tb(s, 5.85, y+0.06, 2.37, 0.66, piaget, 11, color=PURPLE, align=PP_ALIGN.CENTER)
    tb(s, 8.45, y+0.06, 1.47, 0.66, diss, 12, bold=True,
       color=RED_TXT if "YES" in diss or "BOTH" in diss else GREEN_DRK,
       align=PP_ALIGN.CENTER)
    tb(s, 10.15, y+0.06, 2.95, 0.66, meaning, 11, color=DARK)

note(s, "Clinical pearl: A child with ASD may have intact Piaget stage but impaired Parten stage. GDD shows the opposite. The DISSOCIATION is the diagnostic key.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 20 — PARTEN + PIAGET COMBINED OVERVIEW TABLE
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Combined Framework: Parten + Piaget at Each Age",
    "Quick clinical reference — what to expect on BOTH dimensions at each well-child visit")

cols_h = ["Age","Parten Social Stage","Piaget Cognitive Stage","Parent Action","Red Flag"]
cols_x = [0.22,1.68,4.18,6.68,9.78]
cols_w = [1.38,2.42,2.42,3.02,3.42]
box(s, 0.22, 1.3, 13.0, 0.55, DEEP_TEAL)
for txt,cx,cw in zip(cols_h,cols_x,cols_w):
    tb(s, cx+0.04, 1.33, cw-0.06, 0.48, txt, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

combined = [
    ("0–3 mo","Unoccupied","Sensorimotor","Face time; tummy time; narrate","No social smile by 8 wks"),
    ("3–12 mo","Solitary","Sensorimotor","Rattles; floor play; respond to coos","No babbling by 12 mo"),
    ("12–18 mo","Solitary","Functional","Follow child's lead; name objects","No pointing by 14 mo; no words"),
    ("18–24 mo","Solitary / Onlooker","Early Symbolic","Pretend play together; board books","No pretend by 18 mo — M-CHAT-R"),
    ("2–2.5 yr","Onlooker","Early Symbolic","Allow observation; park visits","No peer interest; no 2-word phrases"),
    ("2.5–3 yr","Parallel","Early Symbolic","Arrange proximity; duplicate toys","Rigid solitary; no imitation of peers"),
    ("3–4 yr","Associative","Complex Symbolic","Turn-taking games; small groups","No peer exchange; persistent aggression"),
    ("4+ yr","Cooperative","Complex Symbolic","Board games; protect free play","Cannot follow rules; excluded by peers"),
]
alt=[GRAY_BG,WHITE]
for i,(age_r,parten_r,piaget_r,par_r,rf_r) in enumerate(combined):
    y = 1.93+i*0.64
    rc = alt[i%2]
    for cx,cw in zip(cols_x,cols_w):
        box(s, cx, y, cw, 0.58, rc)
    tb(s, cols_x[0]+0.04,y+0.06,cols_w[0]-0.06,0.48,age_r,11,bold=True,color=DEEP_TEAL)
    tb(s, cols_x[1]+0.04,y+0.06,cols_w[1]-0.06,0.48,parten_r,11,color=P_COL[min(i,5)])
    tb(s, cols_x[2]+0.04,y+0.06,cols_w[2]-0.06,0.48,piaget_r,11,color=PURPLE)
    tb(s, cols_x[3]+0.04,y+0.06,cols_w[3]-0.06,0.48,par_r,11,color=DARK)
    tb(s, cols_x[4]+0.04,y+0.06,cols_w[4]-0.06,0.48,rf_r,10,italic=True,color=RED_TXT)

note(s, "Parten stages (purple): social dimension | Piaget stages (violet): cognitive dimension | Use both at every developmental visit.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 4 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 4,
    "Parental Implications & The Evolving Parent Role",
    "From responder to facilitator — parental role maps to both frameworks",
    ORANGE)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 22 — PARENT ROLES ACROSS STAGES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "The Parent's Evolving Role Across Play Stages",
    "Five distinct parental roles — each matched to a developmental phase")

roles = [
    ("RESPONDER\nStages 1–2 / 0–18 mo",P_COL[1],[
        "Be physically present","Respond to every signal",
        "Narrate and sing","Provide safe sensory-rich space",
        "Tummy time daily","Zero screens"]),
    ("OBSERVER\nStage 3 / 2–2.5 yr",P_COL[2],[
        "Sit nearby without directing","Validate observation",
        "Create peer viewing opportunities","Do NOT force entry",
        "Reassure parents this is healthy","Avoid labelling child as 'shy'"]),
    ("FACILITATOR\nStage 4 / 2–3 yr",P_COL[3],[
        "Arrange play dates","Provide duplicate toys",
        "Do NOT enforce sharing yet","Narrate parallel activity",
        "Gradually reduce space between peers","Celebrate proximity"]),
    ("COACH\nStage 5 / 3–4 yr",P_COL[4],[
        "Teach turn-taking explicitly","Model sharing language",
        "Intervene in aggression only","Encourage small groups",
        "Observe for social exclusion","Use play for emotion vocabulary"]),
    ("SUPPORTER\nStage 6 / 4+ yr",P_COL[5],[
        "Protect unstructured play time","Model sportsmanship",
        "Advocate for recess at school","Allow conflict resolution",
        "Limit over-scheduled activities","Monitor for bullying"]),
]
for i,(title,col,pts) in enumerate(roles):
    x = 0.28+i*2.62
    box(s, x, 1.35, 2.5, 5.55, GRAY_BG)
    box(s, x, 1.35, 2.5, 0.82, col)
    tb(s, x+0.06, 1.38, 2.38, 0.74, title, 12, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    for j,pt in enumerate(pts):
        tb(s, x+0.14, 2.26+j*0.88, 2.22, 0.78, "▸ "+pt, 12, color=DARK)

note(s, "Schneider M et al. Front Psychol 2022 (PMID 35586226): Parent-child play and externalizing/internalizing behaviour — Systematic Review")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 23 — PLAY & ATTACHMENT
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Play and Attachment: The Secure Base Across Both Frameworks",
    "Secure attachment enables richer play on BOTH social (Parten) and cognitive (Piaget) dimensions")

box(s, 0.28, 1.35, 7.9, 5.55, LT_TEAL)
tb(s, 0.42, 1.43, 7.6, 0.42, "How Attachment Underpins Each Stage", 16, bold=True, color=DEEP_TEAL)

attach = [
    ("Stages 1–2 (Sensorimotor)","→ Secure infant explores freely; solitary play is richer and more creative"),
    ("Stage 3 + Functional Play","→ Child uses parent as safe base before observing/imitating peers"),
    ("Stage 4 + Early Symbolic", "→ Tolerates peer proximity when parent is near; pretend play richer"),
    ("Stage 5 + Complex Symbolic","→ Emotional regulation during sharing disputes requires secure base"),
    ("Stage 6 + Cooperative",    "→ Child leaves parent, joins group, and repairs social ruptures"),
]
for i,(cause,effect) in enumerate(attach):
    y = 1.97+i*0.9
    box(s, 0.38, y, 3.95, 0.76, DEEP_TEAL)
    tb(s, 0.46, y+0.09, 3.82, 0.6, cause, 12, bold=True, color=WHITE)
    tb(s, 4.45, y+0.1, 3.58, 0.62, effect, 12, color=DARK)

box(s, 8.45, 1.35, 4.6, 5.55, RED_SOFT)
tb(s, 8.58, 1.43, 4.35, 0.42, "Attachment Red Flags in Play", 14, bold=True, color=RED_TXT)
warns = ["Never uses parent as safe base","No checking back during exploration",
         "Indiscriminate play with strangers","Hypervigilance; cannot enter play",
         "No pleasure or affect during play","Frozen / chaotic play themes",
         "Aggression that ruptures play","No repair after disruption"]
for i,w in enumerate(warns):
    tb(s, 8.58, 1.97+i*0.56, 4.3, 0.5, "⚠ "+w, 12, color=RED_TXT)

note(s, "Source: K&S Comprehensive Textbook of Psychiatry — Infant & Toddler MSE, Section X: Relatedness & Attachment Behaviours")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 24 — SCREENS VS PLAY
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Screens vs. Play: Guidance for Every Stage",
    "Screens cannot advance either Parten social stages or Piaget cognitive stages")

box(s, 0.28, 1.35, 5.9, 5.7, LT_TEAL)
tb(s, 0.42, 1.43, 5.6, 0.42, "AAP Screen Time Guidelines", 16, bold=True, color=DEEP_TEAL)
guides = [
    ("< 18 mo","Video-chat only — Stages 1–2 must be screen-free"),
    ("18–24 mo","High-quality only; always co-view and discuss"),
    ("2–5 yr","Max 1 hr/day high-quality; co-view; discuss content"),
    ("6+ yr","Consistent limits; screens must not displace free play, sleep, or physical activity"),
]
yg = 1.97
for ag,rec in guides:
    box(s, 0.38, yg, 1.72, 0.76, ORANGE)
    tb(s, 0.4, yg+0.09, 1.68, 0.6, ag, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 2.2, yg+0.1, 3.82, 0.65, rec, 13, color=DARK)
    yg += 0.94
box(s, 0.28, 5.64, 5.9, 1.32, GRAY_BG)
tb(s, 0.42, 5.7, 5.6, 0.38, "Evidence:", 12, bold=True, color=DEEP_TEAL)
tb(s, 0.42, 6.1, 5.6, 0.8,
   "Bal et al. 2024 (PMID 39724067): Screen time → delayed language + reduced executive function in 34-study systematic review.",
   11, italic=True, color=DARK)

box(s, 6.45, 1.35, 6.6, 5.7, GREEN_SOFT)
tb(s, 6.6, 1.43, 6.3, 0.42, "Stage-Matched Screen Replacements", 16, bold=True, color=GREEN_DRK)
reps = [
    (P_COL[0],"Unoccupied/Sensorimotor","Tummy time, rattles, mirrors, singing"),
    (P_COL[1],"Solitary/Functional","Blocks, stacking, cause-effect toys, board books"),
    (P_COL[2],"Onlooker/Early Symbolic","Park visits to observe; side-by-side sand play"),
    (P_COL[3],"Parallel/Early Symbolic","Playdough, art side by side, duplicate toys"),
    (P_COL[4],"Associative/Complex Symbolic","Small group sensory play; turn-taking games"),
    (P_COL[5],"Cooperative/Complex Symbolic","Board games, outdoor team play, drama/role play"),
]
for i,(col_r,stage_r,act) in enumerate(reps):
    box(s, 6.52, 2.0+i*0.82, 2.15, 0.68, col_r)
    tb(s, 6.54, 2.0+i*0.82, 2.13, 0.68, stage_r, 10, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, 8.74, 2.06+i*0.82, 4.18, 0.62, act, 13, color=DARK)


# ══════════════════════════════════════════════════════════════════════════
# SECTION 5 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 5,
    "GDD + Ptosis + ASD: Syndromic Differential Diagnosis",
    "When delayed play is part of a recognisable syndrome — what to look for",
    RED_TXT)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 26 — GDD+PTOSIS+ASD INTRO
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "GDD + Ptosis + ASD: Why This Triad Matters",
    "Adding a dysmorphic feature dramatically narrows the differential and raises genetic yield")

box(s, 0.28, 1.35, 8.0, 5.55, LT_TEAL)
tb(s, 0.42, 1.43, 7.7, 0.45, "Characterising the Ptosis — First Step", 16, bold=True, color=DEEP_TEAL)

ptosis_rows = [
    ("Bilateral, congenital, nonprogressive","Noonan, KAT6A, ZNF462 (Weiss-Kruszka), Kabuki"),
    ("Bilateral + fatigable","Congenital Myasthenic Syndrome (CMS)"),
    ("With ophthalmoplegia","Mitochondrial disease (CPEO, MELAS)"),
    ("Worsening over time","Mitochondrial; Myotonic Dystrophy"),
    ("With epicanthal folds + upslanting PF","Down Syndrome (trisomy 21)"),
    ("With downslanting PF + hypertelorism","Noonan / RASopathy"),
    ("Prominent ptosis as DEFINING feature","ZNF462 / Weiss-Kruszka syndrome (83%)"),
]
for i,(feat,diag) in enumerate(ptosis_rows):
    y = 2.0+i*0.72
    box(s, 0.38, y, 4.05, 0.64, DEEP_TEAL if i%2==0 else MED_TEAL)
    tb(s, 0.45, y+0.08, 3.95, 0.52, feat, 12, color=WHITE)
    tb(s, 4.55, y+0.08, 3.58, 0.52, diag, 12, color=DARK)

# Right panel
box(s, 8.55, 1.35, 4.5, 5.55, RGBColor(0xFF,0xF3,0xE0))
tb(s, 8.68, 1.43, 4.25, 0.45, "Genetic Yield in This Triad", 15, bold=True, color=ORANGE)
yields = [
    "GDD alone: ~15–25% yield on CMA+WES",
    "GDD + ASD: ~20–30% yield",
    "GDD + ASD + dysmorphism: ~40–55% yield",
    "Adding ptosis raises yield further",
    "Trio WES is first-line when dysmorphism present",
    "CMA misses point mutations in KAT6A, ZNF462, AUTS2",
    "Trio WES diagnostic yield: 40–66% in GDD cohorts",
]
for i,y_item in enumerate(yields):
    col_y = GREEN_DRK if "raises" in y_item or "40" in y_item or "66" in y_item else DARK
    tb(s, 8.68, 1.97+i*0.68, 4.25, 0.6, "▸ "+y_item, 12, color=col_y)

note(s, "Sources: Kruszka et al. 2019 PMID 31361404; Ng et al. 2024 PMID 38741077; Sanchez-Jimeno et al. 2021 PMID 34573342")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 27 — SYNDROME TABLE
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Priority Syndromes: GDD + Ptosis + ASD",
    "Ranked by fit for the triad — with key distinguishing features")

hdrs2 = ["Syndrome / Gene","Ptosis","ASD","GDD","Key Distinguishing Features"]
hx    = [0.22,3.1,4.08,5.06,6.12]
hw    = [2.78,0.88,0.88,0.96,7.1]
box(s, 0.22, 1.3, 12.98, 0.55, DEEP_TEAL)
for h,cx,cw in zip(hdrs2,hx,hw):
    tb(s, cx+0.04, 1.33, cw-0.06, 0.48, h, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

syndromes = [
    ("Noonan Syndrome\nPTPN11/SOS1/RAF1","30–40%","10–20%","Mild-mod",
     "CHD (pulm stenosis 50–80%), HCM, short stature, hypertelorism, webbed neck"),
    ("ZNF462 / Weiss-Kruszka\nZNF462","83%","33%","Mild-mod",
     "Ptosis is DEFINING; craniosynostosis 33%; CC dysgenesis 25%; hypotonia 50%"),
    ("KAT6A Syndrome\nKAT6A","Present","30–40%","Mod-severe",
     "Minimally verbal; preserved social drive despite ASD features; feeding difficulties"),
    ("AUTS2 Syndrome\nAUTS2","40%","52%","Mod-severe",
     "Microcephaly 65%; ADHD 54%; short stature; 3' variants → more severe"),
    ("Kabuki Syndrome\nKMT2D/KDM6A","Present","Variable","Mild-mod",
     "Fetal fingertip pads (hallmark); long PF; arched eyebrows; cupped ears"),
    ("CHARGE Syndrome\nCHD7","Present","~50%","Mod-severe",
     "Coloboma; choanal atresia; semicircular canal hypoplasia; ear anomalies"),
    ("Angelman Syndrome\nUBE3A","Occasional","Present","Severe",
     "Happy affect; absent speech; seizures; ataxia; methylation analysis"),
]
scols = [RGBColor(0xEB,0xF5,0xFB),WHITE,RGBColor(0xEB,0xF5,0xFB),WHITE,RGBColor(0xEB,0xF5,0xFB),WHITE,RGBColor(0xEB,0xF5,0xFB)]
for i,(syn,pto,asd_p,gdd_p,feat) in enumerate(syndromes):
    y = 1.93+i*0.74
    rc = scols[i]
    for cx,cw in zip(hx,hw):
        box(s, cx, y, cw-0.04, 0.68, rc)
    tb(s, hx[0]+0.04,y+0.06,hw[0]-0.06,0.58,syn,11,bold=True,color=DEEP_TEAL)
    for j,val in enumerate([pto,asd_p,gdd_p]):
        col_v = RED_TXT if "%" in val and int(val.split("%")[0].split("–")[-1]) > 40 else DARK
        tb(s, hx[j+1]+0.04,y+0.06,hw[j+1]-0.06,0.58,val,11,color=col_v,align=PP_ALIGN.CENTER)
    tb(s, hx[4]+0.04,y+0.06,hw[4]-0.06,0.58,feat,11,color=DARK)

note(s, "Kruszka 2019 (ZNF462); Ng 2024 (KAT6A); Sanchez-Jimeno 2021 (AUTS2); Geoffray 2020 (Noonan/RASopathies)")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 28 — INVESTIGATION ALGORITHM
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Investigation Algorithm: GDD + Ptosis + ASD",
    "Stepwise workup — Trio WES is first-line when dysmorphism is present")

# Tier 1
box(s, 0.28, 1.35, 12.78, 0.52, DEEP_TEAL)
tb(s, 0.38, 1.38, 12.6, 0.44, "TIER 1  (First-line — do at the same time)", 14, bold=True, color=WHITE)
tier1 = [
    ("Chromosomal Microarray (CMA)","Detects CNVs; yield ~20–32% in unexplained GDD/ID"),
    ("Fragile X (FMR1 CGG repeat)","Especially in males; most common single-gene ID cause"),
    ("Methylation studies","If Angelman / Prader-Willi clinically suspected"),
    ("Metabolic screen","Lactate, pyruvate, ammonia, organic acids, amino acids"),
]
for i,(test,desc) in enumerate(tier1):
    y = 1.95+i*0.55
    box(s, 0.28, y, 6.35, 0.5, LT_TEAL if i%2==0 else WHITE)
    tb(s, 0.38, y+0.06, 3.1, 0.4, test, 12, bold=True, color=DEEP_TEAL)
    tb(s, 3.55, y+0.06, 3.0, 0.4, desc, 12, color=DARK)

# Tier 2
box(s, 0.28, 4.22, 12.78, 0.52, PURPLE)
tb(s, 0.38, 4.25, 12.6, 0.44,
   "TIER 2  (If CMA + Fragile X negative — highest yield step)", 14, bold=True, color=WHITE)
tier2 = [
    ("Trio Whole Exome Sequencing (WES)","Proband + both parents. Diagnostic yield ~40–66% in GDD + dysmorphism"),
    ("Detects","KAT6A (de novo), ZNF462 (de novo), AUTS2, KMT2D, CHD7, ZEB2, RASopathy genes"),
    ("Note","Noonan/RASopathies: dedicated RASopathy panel OR trio WES — both acceptable"),
]
for i,(lbl,desc) in enumerate(tier2):
    y = 4.82+i*0.55
    box(s, 0.28, y, 6.35, 0.5, LT_PURPLE if i%2==0 else WHITE)
    tb(s, 0.38, y+0.06, 1.7, 0.4, lbl+":", 12, bold=True, color=PURPLE)
    tb(s, 2.12, y+0.06, 4.4, 0.4, desc, 12, color=DARK)

# Right column: additional workups
box(s, 6.82, 1.35, 6.24, 5.5, GRAY_BG)
tb(s, 6.95, 1.43, 5.9, 0.4, "Additional Workup (All Patients)", 14, bold=True, color=DARK)
addl = [
    "Brain MRI — CC anomalies (ZNF462); cortical malformations",
    "Ophthalmology — coloboma; strabismus; visual acuity",
    "Cardiology — ECG + echo (Noonan, KAT6A, CHARGE)",
    "Hearing screen — auditory brainstem response",
    "Formal ASD assessment — ADOS-2 / ADI-R",
    "EEG — if seizures suspected",
    "Formal developmental testing (Griffiths/Bayley)",
    "Growth parameters — height, weight, OFC trend",
    "Feeding assessment — KAT6A, AUTS2 have severe feeding Hx",
]
for i,a in enumerate(addl):
    tb(s, 6.95, 1.92+i*0.52, 5.95, 0.48, "✓ "+a, 12, color=DARK)

note(s, "Wojcik MH et al. NEJM 2024;390:1985–1997: Genome sequencing for diagnosing rare diseases.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 6 DIVIDER
# ══════════════════════════════════════════════════════════════════════════
section_divider(prs, 6,
    "Special Populations & Well-Child Visit Integration",
    "ASD · ADHD · GDD · Trauma — and play guidance at every visit",
    GREEN_DRK)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 30 — SPECIAL POPULATIONS
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Play in Special Populations",
    "Adapt BOTH Parten and Piaget expectations to developmental — not chronological — age")

pops = [
    ("Autism\nSpectrum Disorder",P_COL[0],[
        "Often plateau at Solitary or Parallel (Parten)",
        "Piaget stage may be higher than Parten stage",
        "This dissociation IS the ASD signal",
        "Restricted, repetitive solitary play = core marker",
        "ESDM/PRT/JASPER target each Parten stage"]),
    ("ADHD",P_COL[2],[
        "Short attention span disrupts sustained play",
        "Impulsivity breaks Associative play rules",
        "Rule violations → conflict in Cooperative play",
        "Parten stage may appear lower than actual ability",
        "Structure + shorter play sessions + praise help"]),
    ("GDD / ID",P_COL[3],[
        "Both Parten AND Piaget stages lag chronological age",
        "Adapt to developmental age on BOTH frameworks",
        "Play-based OT + SLP targets each stage",
        "Open-ended sensory play most accessible",
        "Celebrate each stage achieved at any age"]),
    ("Trauma / ACE",P_COL[4],[
        "Regression to earlier Parten stages under stress",
        "Hypervigilance disrupts Onlooker → Parallel",
        "Repetitive re-enactment in Piaget Symbolic play",
        "Cooperative play requires safety — trauma blocks it",
        "Trauma-focused play therapy (TF-CBT)"]),
]
for i,(pop,col,pts) in enumerate(pops):
    x = 0.28+i*3.27
    box(s, x, 1.35, 3.12, 5.72, GRAY_BG)
    box(s, x, 1.35, 3.12, 0.72, col)
    tb(s, x+0.06, 1.38, 3.0, 0.66, pop, 14, bold=True,
       color=WHITE, align=PP_ALIGN.CENTER)
    for j,pt in enumerate(pts):
        tb(s, x+0.15, 2.17+j*0.95, 2.82, 0.84, "▸ "+pt, 13, color=DARK)

note(s, "Sandbank M et al. BMJ 2023 PMID 37963634 (AIM Project — ASD early intervention meta-analysis)")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 31 — WELL-CHILD VISIT INTEGRATION
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Play Guidance at Every Well-Child Visit",
    "Parten stage + Piaget stage + parental advice + red flag — at every visit")

vc_hdrs = ["Visit","Parten Stage","Piaget Stage","Ask / Assess","Advise Parents"]
vc_x    = [0.22,1.72,3.62,5.52,8.72]
vc_w    = [1.42,1.82,1.82,3.12,4.52]
box(s, 0.22, 1.3, 12.98, 0.52, DEEP_TEAL)
for h,cx,cw in zip(vc_hdrs,vc_x,vc_w):
    tb(s, cx+0.04, 1.33, cw-0.06, 0.44, h, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

visits = [
    ("2 month","Unoccupied","Sensorimotor","Social smile? Tracks face? Startles?","Tummy time; talk/sing; NO screens; respond to all cries"),
    ("6 month","Solitary","Sensorimotor","Reaches for toys? Laughs in play?","Floor play 30 min/day; varied textures; board books"),
    ("9 month","Solitary","Sensorimotor→","Object permanence? Vocalises? Peek-a-boo?","Follow child's gaze; cause-effect toys; park visits"),
    ("12 month","Solitary","Functional","Points? Uses objects functionally?","Name objects; limit screens; M-CHAT-R scheduled"),
    ("18 month","Onlooker/Parallel","Early Symbolic","Pretend play? Watches peers? M-CHAT-R","M-CHAT-R; open-ended toys; play dates; no forced sharing"),
    ("24 month","Parallel","Early Symbolic","2-word phrases? Plays near peers?","Arrange proximity; duplicate toys; reassure re sharing"),
    ("3 year","Associative","Complex Symbolic","Interacts with peers? Turn-taking?","Preschool; small group play; turn-taking games"),
    ("4–5 year","Cooperative","Complex Symbolic","Follows game rules? Group play?","Board games; outdoor free play; protect recess"),
]
alt=[GRAY_BG,WHITE]
for i,(vis,par,pia,ask,adv) in enumerate(visits):
    y = 1.9+i*0.63
    rc = alt[i%2]
    for cx,cw in zip(vc_x,vc_w):
        box(s, cx, y, cw-0.04, 0.57, rc)
    tb(s, vc_x[0]+0.04,y+0.06,vc_w[0]-0.06,0.48,vis,11,bold=True,color=DEEP_TEAL)
    tb(s, vc_x[1]+0.04,y+0.06,vc_w[1]-0.06,0.48,par,11,color=P_COL[min(i,5)])
    tb(s, vc_x[2]+0.04,y+0.06,vc_w[2]-0.06,0.48,pia,11,color=PURPLE)
    tb(s, vc_x[3]+0.04,y+0.06,vc_w[3]-0.06,0.48,ask,11,italic=True,color=DARK)
    tb(s, vc_x[4]+0.04,y+0.06,vc_w[4]-0.06,0.48,adv,11,color=GRAY_TXT)

note(s, "Murray R et al. Pediatrics 2026 PMID 42107976 — The Crucial Role of Recess in School: Policy Statement")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 32 — RED FLAGS MASTER TABLE
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "Master Red Flags Table: Both Frameworks",
    "Stagnation on either Parten OR Piaget dimension beyond expected age demands action")

rf_hdrs = ["Age","Parten Stage\nExpected","Piaget Stage\nExpected","Red Flag","Investigate"]
rfx     = [0.22,1.68,3.38,5.08,9.22]
rfw     = [1.38,1.62,1.62,4.06,4.0]
box(s, 0.22, 1.3, 12.98, 0.58, RED_TXT)
for h,cx,cw in zip(rf_hdrs,rfx,rfw):
    tb(s, cx+0.04, 1.33, cw-0.06, 0.52, h, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rfs = [
    ("0–3 mo","Unoccupied","Sensorimotor",
     "No social smile; no tracking; no startle",
     "Vision/hearing; ophthalmology; neurology"),
    ("12 mo","Solitary","Sensorimotor→Functional",
     "No pointing; no object use; no single words",
     "Hearing screen; M-CHAT-R (18 mo); SLP"),
    ("18 mo","Onlooker","Early Symbolic",
     "No pretend play; no peer interest",
     "M-CHAT-R; ASD assessment; SLP"),
    ("24 mo","Parallel","Early Symbolic",
     "No 2-word phrases; no symbolic play; isolated",
     "Formal developmental eval; ASD; consider trio WES"),
    ("36 mo","Associative","Complex Symbolic",
     "Rigid solitary play; no peer exchange",
     "ASD/GDD workup; trio WES; social skills Rx"),
    ("5 yr","Cooperative","Complex Symbolic",
     "Cannot follow game rules; extreme aggression",
     "ADHD/ASD eval; executive function; CBT"),
]
alt=[GRAY_BG,WHITE]
for i,(age_r,par_r,pia_r,flag_r,inv_r) in enumerate(rfs):
    y = 1.96+i*0.82
    rc = alt[i%2]
    for cx,cw in zip(rfx,rfw):
        box(s, cx, y, cw-0.04, 0.76, rc)
    tb(s, rfx[0]+0.04,y+0.08,rfw[0]-0.06,0.62,age_r,12,bold=True,color=DEEP_TEAL)
    tb(s, rfx[1]+0.04,y+0.08,rfw[1]-0.06,0.62,par_r,11,color=P_COL[min(i,5)])
    tb(s, rfx[2]+0.04,y+0.08,rfw[2]-0.06,0.62,pia_r,11,color=PURPLE)
    tb(s, rfx[3]+0.04,y+0.08,rfw[3]-0.06,0.62,flag_r,11,bold=True,color=RED_TXT)
    tb(s, rfx[4]+0.04,y+0.08,rfw[4]-0.06,0.62,inv_r,10,italic=True,color=GRAY_TXT)

note(s, "Early identification enables early intervention. WES trio first-line when dysmorphism or syndromic features present.")


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 33 — KEY MESSAGES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, DEEP_TEAL)
box(s, 0, 0, 13.333, 1.22, RGBColor(0x00,0x3D,0x4F))
box(s, 0, 1.12, 13.333, 0.1, GOLD)
tb(s, 0, 0.08, 13.333, 0.7,
   "Key Take-Home Messages", 32, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(s, 0, 0.76, 13.333, 0.38,
   "For developmental pediatricians and parents",
   15, italic=True, color=RGBColor(0xCC,0xE8,0xEC), align=PP_ALIGN.CENTER)

msgs = [
    ("1","Parten = Social; Piaget = Cognitive","Use both: they answer different questions and their DISSOCIATION is your diagnostic tool."),
    ("2","Both frameworks are valid","Neither replaces the other. A complete developmental assessment uses both lenses."),
    ("3","Stages are sequential, not rigid","Earlier stages persist. A cooperative child still uses solitary play when appropriate."),
    ("4","Parent role evolves with the child","Responder → Observer → Facilitator → Coach → Supporter. Each role has specific actions."),
    ("5","GDD + Ptosis + ASD = genetic workup","This triad warrants trio WES. ZNF462, KAT6A, AUTS2, Noonan are priority diagnoses."),
    ("6","Screens displace BOTH play dimensions","They cannot advance social (Parten) or cognitive (Piaget) play stages."),
    ("7","Protect play time at every age","Unstructured free play daily is non-negotiable — it is the vehicle for all development."),
    ("8","Red flags need timely action","Stagnation on either framework beyond expected age warrants screening and referral."),
]

for i,(num,title,body) in enumerate(msgs):
    row = i%4; col_i = i//4
    x = 0.22+col_i*6.6
    y = 1.35+row*1.5
    box(s, x, y, 6.3, 1.35, WHITE)
    box(s, x, y, 0.58, 1.35, P_COL[min(i,5)])
    tb(s, x, y, 0.58, 1.35, num, 20, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    tb(s, x+0.66, y+0.07, 5.48, 0.42, title, 14, bold=True, color=DEEP_TEAL)
    tb(s, x+0.66, y+0.52, 5.48, 0.72, body, 12, color=DARK)

box(s, 0, 7.08, 13.333, 0.42, ORANGE)
tb(s, 0, 7.11, 13.333, 0.36,
   '"Play is the work of the child." — Montessori  |  Parten 1932  |  Piaget 1954  |  K&S 11th ed.',
   13, bold=True, italic=True, color=WHITE, align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 34 — REFERENCES
# ══════════════════════════════════════════════════════════════════════════
s = prs.slides.add_slide(BL)
bg(s, WHITE)
hdr(s, "References & Further Reading")

refs = [
    "1.  Parten MB. Social participation among pre-school children. J Abnorm Soc Psychol. 1932;27(3):243–269.",
    "2.  Piaget J. The Construction of Reality in the Child. Basic Books, 1954.",
    "3.  Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. — Section VIII: Play (Infant & Toddler MSE).",
    "4.  Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. — Developmental Milestones in Preschoolers.",
    "5.  AAP. 'The Power of Play: A Pediatric Role in Enhancing Development.' Pediatrics 2018;142(3):e20182058.",
    "6.  Murray R et al. 'The Crucial Role of Recess in School.' Pediatrics 2026. PMID 42107976.",
    "7.  Schneider M et al. 'Parent-Child Play and Externalizing/Internalizing Behaviour.' Front Psychol 2022. PMID 35586226.",
    "8.  Bal M et al. 'Screen time, language development, and executive function.' PLoS One 2024. PMID 39724067.",
    "9.  Kruszka P et al. 'Phenotype delineation of ZNF462 related syndrome.' AJMGA 2019. PMID 31361404.",
    "10. Ng R et al. 'Neuropsychological profile of KAT6A syndrome.' Orphanet J Rare Dis 2024. PMID 38741077.",
    "11. Sanchez-Jimeno C et al. 'ADHD and ASD as core symptoms of AUTS2 syndrome.' Genes 2021. PMID 34573342.",
    "12. Thompson & Thompson Genetics and Genomics in Medicine, 9th ed. — Noonan Syndrome.",
    "13. Sandbank M et al. 'Autism intervention meta-analysis (Project AIM).' BMJ 2023. PMID 37963634.",
]
for i,ref in enumerate(refs):
    tb(s, 0.38, 1.35+i*0.44, 12.58, 0.4, ref, 11, color=DARK)

box(s, 0, 7.08, 13.333, 0.42, DEEP_TEAL)
tb(s, 0, 7.11, 13.333, 0.36,
   "Seminar for Developmental Pediatricians | Mixed Audience | 60–90 min | July 2026",
   12, italic=True, color=WHITE, align=PP_ALIGN.CENTER)


# ── SAVE ──────────────────────────────────────────────────────────────────
out = "/tmp/workspace/play-seminar/Master_Play_Seminar_Pediatrician.pptx"
buf = BytesIO()
prs.save(buf)
with open(out,"wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/play-seminar && python build_master_pptx.py 2>&1

Editing File

~/play-seminar/build_master_pptx.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_master_pptx.py'
Running Command

cd /tmp/workspace/play-seminar && python build_master_pptx.py 2>&1

Running Command

ls -lh /tmp/workspace/play-seminar/Master_Play_Seminar_Pediatrician.pptx

Your master seminar presentation is ready — 34 slides covering everything:

Master Play Seminar Pediatrician

Presentation · PPTX


Complete Slide Map (34 slides, 6 sections)

SlidesSectionContent
1–2IntroMaster title + 6 learning objectives
3Section DividerParten's 6 Social Stages
4Parten Road MapVisual 6-stage progression with age axis
5–106 Parten stagesOne full slide each: Unoccupied → Solitary → Onlooker → Parallel → Associative → Cooperative
11Section DividerPiaget's 4 Cognitive Stages
12Piaget Road MapVisual 4-stage progression with Piaget links
13–164 Piaget stagesOne full slide each: Sensorimotor → Functional → Early Symbolic → Complex Symbolic
17Section DividerIntegrating Both Frameworks
18Parten vs PiagetSide-by-side comparison — two lenses, one child
19Dissociation TableWhen Parten ≠ Piaget — the diagnostic power slide (typical / ASD / GDD / ASD+GDD / DLD)
20Combined Quick-ReferenceBoth frameworks at every age in one table
21Section DividerParental Implications
22Evolving Parent Role5 roles: Responder → Observer → Facilitator → Coach → Supporter
23Play & AttachmentSecure base mapped to each stage
24Screens vs. PlayAAP guidelines + stage-matched screen replacements
25Section DividerGDD + Ptosis + ASD
26Ptosis CharacterisationTypes of ptosis + genetic yield in this triad
27Syndrome TableNoonan, ZNF462, KAT6A, AUTS2, Kabuki, CHARGE, Angelman
28Investigation AlgorithmTier 1 (CMA/FX/metabolic) → Tier 2 (Trio WES) + add-on workup
29Section DividerSpecial Populations + Well-Child Visits
30Special PopulationsASD · ADHD · GDD · Trauma — play adaptations
31Well-Child Visit GuideBoth frameworks + ask/advise at every visit from 2 months to 5 years
32Master Red Flags TableBoth Parten AND Piaget red flags at each age
33Key Messages8 take-home pearls with colour coding
34References13 citations including Parten 1932, K&S, AAP, 6 PubMed papers

What are developmental stages of play according to Piaget and give me reference

Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Finding Sources
Finding Sources
I have the primary textbook source directly. Here is the complete, referenced answer.

Piaget's Developmental Stages of Play

Piaget did not create a standalone "play taxonomy" in the way Parten did. Rather, his theory of play emerges directly from his broader theory of cognitive development. He described play as the expression of the child's current cognitive stage — play changes as thinking changes.

Piaget's Classification of Play (from Play, Dreams and Imitation in Childhood, 1951)

Piaget identified three main types of play corresponding to his cognitive stages, plus a fourth that emerges later:

1. Practice Play (Functional / Sensorimotor Play)

Age: Birth – 2 years (Sensorimotor Stage)
  • The child repeats actions purely for the pleasure of mastery — no goal beyond the activity itself
  • Mouthing, banging, dropping, shaking, throwing objects
  • Exploring moving parts of objects (poking, pulling, rotating)
  • Peek-a-boo, sound imitation with caregiver
  • Substage progression within sensorimotor (6 Piagetian substages):
    • 0–12 months: mouthing, banging, dropping, throwing
    • 6–12 months: exploring object characteristics (moving parts, poking, pulling)
  • Key principle: Action schemas are practised and consolidated — the child learns about the world through the body
"0–12 months of age: Mouthing, banging, dropping and throwing toys or other objects... 6–12 months: Exploring characteristics of objects (e.g., moving parts, poking, and pulling)." — Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed., Section VIII: Play, p. 10654

2. Functional Play

Age: 12–18 months (late Sensorimotor)
  • Child uses objects according to their actual function or purpose
  • Pushes a toy car, touches a comb to hair, holds a toy phone to the ear
  • Shows understanding of cause-and-effect and object permanence
  • Imitates domestic actions (sweeping, stirring)
  • Key principle: Object permanence is consolidated; the child understands that objects have defined, consistent functions in the world
"12–18 months of age: Child's use of objects shows understanding and exploration of their use or function (e.g., pushes car, touches comb to hair, and puts telephone to ear)." — Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed., Section VIII: Play

3. Symbolic (Make-Believe / Pretend) Play

Age: 18 months – 7 years (Pre-operational Stage)
Piaget subdivided this into two phases:

a. Early Symbolic Play — 18 months+

  • Child pretends using own body (pretends to eat, to sleep)
  • Uses another person as an agent ("feeds" mother)
  • Object substitution: one object represents another (a block becomes a car)
  • Sequences activities in pretend (cooking, then eating)

b. Complex Symbolic / Dramatic Play — 30 months+

  • Child plans and acts out dramatic play sequences
  • Uses imaginary objects (invisible tea, imaginary fire)
  • Incorporates others into play with assigned roles ("you be the patient")
  • Narrative arcs: beginning, middle, end
  • Imaginary companions emerge (present in up to 50% of children age 3–10)
"18 months of age and older: Child pretends with increasing complexity; pretends with own body to eat or to sleep; child pretends with objects or other people (e.g., 'feeds' mother); child uses one object to represent another (e.g., a block becomes a car); child pretends a sequence of activities (e.g., cooking and eating)."
"30 months of age and older: Child plans and acts out dramatic play sequences, uses imaginary objects. Later, child incorporates others into play with assigned roles." — Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed., Section VIII: Play, p. 10654–10655
Key principle: Symbolic play is the hallmark of Pre-operational thought. The capacity to let one thing stand for another (symbol formation) is also the foundation of language, drawing, and mathematical thinking.

4. Constructive Play

Age: 3–7 years (Pre-operational, overlapping Concrete Operational)
  • Child uses objects or materials to build or create something
  • Building with blocks, drawing, making puzzles, using playdough to make shapes
  • Combines sensorimotor skill with symbolic intent
  • Most common type of play observed in preschool settings
  • Key principle: Child exerts deliberate control over materials to produce a planned outcome — early logical-mathematical thinking

5. Games with Rules

Age: 7 years+ (Concrete Operational Stage)
  • Organised games with pre-established, fixed rules
  • Rules are understood as social contracts — not invented by the child
  • Board games, card games, team sports
  • Child can inhibit impulses to follow rules (requires executive function)
  • Moral understanding of fairness, cheating, winning and losing develops here
  • Key principle: Corresponds exactly to Piaget's Concrete Operational stage — logical, rule-governed thinking applied to social play
Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. — Developmental Milestones (School-Age): "Logical exploration tends to dominate fantasy, and children show an increased interest in rules and orderliness."

Summary Table

StageAgePiaget's Cognitive StageKey Feature
Practice / Sensorimotor0–12 monthsSensorimotorRepetition for mastery; no goal
Functional12–18 monthsLate SensorimotorObjects used for their function
Early Symbolic18 mo – 3 yrPre-operationalPretend; object substitution
Complex Symbolic / Dramatic30 mo – 5 yrPre-operationalRoles; scripts; imaginary objects
Constructive3–7 yrPre-operational → ConcreteBuilding / creating with intent
Games with Rules7 yr+Concrete OperationalFixed rules; social contracts

References

Primary Source:
Piaget J. Play, Dreams and Imitation in Childhood (La formation du symbole chez l'enfant). Neuchâtel: Delachaux & Niestlé, 1945. English translation: New York: W.W. Norton, 1951.
Textbook Sources (directly cited above):
Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. (Sadock BJ, Sadock VA, Ruiz P, eds). Section VIII: Play — Infant and Toddler Mental Status Examination, pp. 10654–10655.
Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. — Developmental Milestones in Preschoolers and School-Age Children.
Piaget J. The Construction of Reality in the Child. New York: Basic Books, 1954.
Important clarification for your seminar: Piaget's classification (Practice → Functional → Symbolic → Constructive → Games with Rules) describes how cognitively the child plays. It is distinct from Parten's classification (Unoccupied → Solitary → Onlooker → Parallel → Associative → Cooperative), which describes with whom socially the child plays. The two frameworks are complementary and should be used together in developmental assessment.
attachment
attachment

Why you mentioned me incorrectly

You are absolutely right to flag this, and I apologise.
Looking at the slide from the first PPT I made (Developmental_Stages_of_Play_Seminar.pptx), the overview table shows:
StageAge
Sensorimotor0–12 mo
Functional12–18 mo
Parallel18mo–3 yr
Early Symbolic18mo–3 yr
Complex Symbolic30 mo+
Cooperative4–6 yr

The Error

Parallel play (Parten) was incorrectly placed inside a Piaget cognitive framework table.
That slide was titled "Developmental Stages of Play: Overview" with a "Cognitive Link" column — it was meant to be a Piaget-only cognitive table. But I mixed in Parallel play, which is a Parten social stage, not a Piaget cognitive stage.
Parallel play does not belong in Piaget's framework at all.

The Correct Piaget-Only Stages Are:

StageAgeFramework
Sensorimotor / Practice Play0–12 mo✅ Piaget
Functional Play12–18 mo✅ Piaget
Early Symbolic Play18 mo–3 yr✅ Piaget
Complex Symbolic Play30 mo+✅ Piaget
Constructive Play3–7 yr✅ Piaget
Games with Rules7 yr+✅ Piaget
Parallel Play18mo–3 yr❌ This is Parten, not Piaget

Why It Happened

In the first PPT, I was trying to combine both frameworks into a single overview table before properly separating them. I incorrectly inserted a Parten social stage into what should have been a Piaget cognitive column. This is exactly the kind of framework confusion I later corrected in the master PPT (slides 4 and 12), where Parten and Piaget each have their own dedicated road map.
The Master PPT (Master_Play_Seminar_Pediatrician.pptx) has this corrected — Parten and Piaget are fully separated. Would you like me to fix the overview table in that presentation as well to make it explicit?

Give me ppt with piagets stages of play I need to make seminar on this so make ppt like this Also include importance of play Piagets play stages how reflects piagets coginitive stages Also include parten stages of play separately And parental implications and what parent and pediatrician need to observe during play Red flags Significance of play in neurodevelopmental conditions Like play types in conditions and parental implications

Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Finding Sources

Are you not gonna make ppt?

Building it right now!
Writing File

~/play-seminar/build_piaget_seminar.py


from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN
from io import BytesIO

# ── Palette ────────────────────────────────────────────────────────────────
NAVY       = RGBColor(0x0D, 0x2B, 0x55)
TEAL       = RGBColor(0x00, 0x7B, 0x8A)
LT_TEAL    = RGBColor(0xD6, 0xEF, 0xF1)
GOLD       = RGBColor(0xF0, 0xB3, 0x27)
ORANGE     = RGBColor(0xC9, 0x6B, 0x1E)
WHITE      = RGBColor(0xFF, 0xFF, 0xFF)
DARK       = RGBColor(0x16, 0x1F, 0x30)
GRAY_BG    = RGBColor(0xF3, 0xF5, 0xF7)
GRAY_TXT   = RGBColor(0x5A, 0x6A, 0x7A)
RED_BG     = RGBColor(0xFD, 0xEC, 0xEC)
RED_TXT    = RGBColor(0xA8, 0x18, 0x18)
GREEN_BG   = RGBColor(0xE8, 0xF6, 0xEE)
GREEN_DRK  = RGBColor(0x1B, 0x6A, 0x33)
PURPLE     = RGBColor(0x6A, 0x33, 0x8C)
LT_PURPLE  = RGBColor(0xEE, 0xE5, 0xF6)
AMBER      = RGBColor(0xFF, 0xF3, 0xCD)

# Piaget stage colours
PC = [
    RGBColor(0x1E, 0x6B, 0xAD),  # Practice/Sensorimotor – blue
    RGBColor(0x0E, 0x83, 0x6C),  # Functional – teal-green
    RGBColor(0xD4, 0x7A, 0x00),  # Early Symbolic – amber
    RGBColor(0x8E, 0x24, 0xAA),  # Complex Symbolic – purple
    RGBColor(0x2E, 0x7D, 0x32),  # Constructive – green
    RGBColor(0x00, 0x5F, 0x73),  # Games with Rules – deep teal
]
# Parten stage colours
SC = [
    RGBColor(0x78, 0x28, 0x9C),  # Unoccupied
    RGBColor(0x21, 0x6F, 0xAD),  # Solitary
    RGBColor(0x0E, 0x85, 0x6E),  # Onlooker
    RGBColor(0xCA, 0x6F, 0x1E),  # Parallel
    RGBColor(0xB0, 0x3A, 0x2E),  # Associative
    RGBColor(0x00, 0x5F, 0x73),  # Cooperative
]

W = Inches(13.333); H = Inches(7.5)
prs = Presentation()
prs.slide_width = W; prs.slide_height = H
BL = prs.slide_layouts[6]

# ── helpers ────────────────────────────────────────────────────────────────
def bg(slide, c):
    f=slide.background.fill; f.solid(); f.fore_color.rgb=c

def bx(slide,l,t,w,h,c):
    sh=slide.shapes.add_shape(1,Inches(l),Inches(t),Inches(w),Inches(h))
    sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.fill.background(); return sh

def tb(slide,l,t,w,h,text,sz,bold=False,italic=False,color=None,align=PP_ALIGN.LEFT,wrap=True):
    bx2=slide.shapes.add_textbox(Inches(l),Inches(t),Inches(w),Inches(h))
    tf=bx2.text_frame; tf.word_wrap=wrap
    tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=Pt(1)
    for i,ln in enumerate(str(text).split('\n')):
        p=tf.paragraphs[0] if i==0 else tf.add_paragraph()
        p.alignment=align; r=p.add_run(); r.text=ln
        r.font.size=Pt(sz); r.font.bold=bold; r.font.italic=italic
        if color: r.font.color.rgb=color

def hdr(slide,title,sub=None):
    bx(slide,0,0,13.333,1.22,NAVY)
    bx(slide,0,1.12,13.333,0.1,GOLD)
    tb(slide,0.35,0.07,12.6,0.72,title,30,bold=True,color=WHITE)
    if sub: tb(slide,0.35,0.76,12.6,0.38,sub,13,italic=True,color=RGBColor(0xCC,0xE0,0xFF))

def sec_div(title,sub,col):
    s=prs.slides.add_slide(BL); bg(s,col)
    bx(s,0,3.15,13.333,0.12,GOLD)
    tb(s,0.5,0.9,12.3,0.7,"SECTION",22,bold=True,color=GOLD,align=PP_ALIGN.CENTER)
    tb(s,0.5,1.7,12.3,1.15,title,40,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    tb(s,0.5,3.4,12.3,0.75,sub,19,italic=True,color=RGBColor(0xCC,0xE8,0xFF),align=PP_ALIGN.CENTER)

def note(slide,text,y=7.1):
    tb(slide,0.3,y,12.7,0.38,text,10,italic=True,color=GRAY_TXT)

def rfbar(slide,text,y=5.35):
    bx(slide,0.28,y,12.78,0.7,RED_BG)
    tb(slide,0.4,y+0.05,12.5,0.6,"🚩 Red Flags: "+text,12,color=RED_TXT)

def panel(slide,l,t,w,h,title,items,bgc,tc=NAVY,fs=13):
    bx(slide,l,t,w,h,bgc)
    tb(slide,l+0.14,t+0.1,w-0.22,0.4,title,15,bold=True,color=tc)
    for i,it in enumerate(items):
        tb(slide,l+0.2,t+0.58+i*0.44,w-0.3,0.4,"▸ "+it,fs,color=DARK)

def badge(slide,l,t,text,col,w=2.4,h=0.46):
    bx(slide,l,t,w,h,col)
    tb(slide,l,t,w,h,text,13,bold=True,color=WHITE,align=PP_ALIGN.CENTER)


# ══════════════════════════════════════════════════════════════════════════
# SLIDE 1 — TITLE
# ══════════════════════════════════════════════════════════════════════════
s=prs.slides.add_slide(BL); bg(s,NAVY)
bx(s,0.9,1.0,11.5,5.45,WHITE)
bx(s,0.9,1.0,11.5,0.1,GOLD); bx(s,0.9,6.35,11.5,0.1,GOLD)
tb(s,1.1,1.22,11.1,0.95,"Developmental Stages of Play",38,bold=True,color=NAVY,align=PP_ALIGN.CENTER)
tb(s,1.1,2.25,11.1,0.62,"Piaget's Cognitive Play Stages  ·  Parten's Social Play Stages",22,bold=True,color=TEAL,align=PP_ALIGN.CENTER)
bx(s,3.5,3.02,6.3,0.08,GOLD)
tb(s,1.1,3.18,11.1,0.5,"Why Play Matters  ·  Parental & Pediatrician Observations  ·  Red Flags  ·  Neurodevelopmental Conditions",14,italic=True,color=GRAY_TXT,align=PP_ALIGN.CENTER)
tb(s,1.1,3.78,11.1,0.45,"A Seminar for Developmental Pediatricians",17,color=DARK,align=PP_ALIGN.CENTER)
tb(s,1.1,4.3,11.1,0.38,"Mixed Audience: Clinicians & Parents  |  60–90 Minutes  |  July 2026",14,italic=True,color=GRAY_TXT,align=PP_ALIGN.CENTER)
bx(s,0,6.78,13.333,0.72,TEAL)
tb(s,0,6.82,13.333,0.45,'"Play is the work of the child." — Montessori  |  "Play is the highest form of research." — Einstein',14,bold=True,italic=True,color=WHITE,align=PP_ALIGN.CENTER)

# ══════════════════════════════════════════════════════════════════════════
# SLIDE 2 — AGENDA
# ══════════════════════════════════════════════════════════════════════════
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Seminar Agenda","Seven sections — 60 to 90 minutes")
sections=[
    ("1","Why Play Matters","Importance of play across developmental domains"),
    ("2","Piaget's Cognitive Play Stages","Practice → Functional → Symbolic → Constructive → Games with Rules"),
    ("3","How Play Reflects Piaget's Cognitive Stages","The play-cognition link at each stage"),
    ("4","Parten's Social Play Stages","Unoccupied → Solitary → Onlooker → Parallel → Associative → Cooperative"),
    ("5","Parental & Pediatrician Observations","What to look for at each stage in the clinic and at home"),
    ("6","Red Flags in Play","Age-specific warning signs requiring action"),
    ("7","Play in Neurodevelopmental Conditions","ASD · ADHD · GDD · DCD · Language Disorders · Trauma"),
]
for i,(num,title,sub) in enumerate(sections):
    y=1.38+i*0.83
    bx(s,0.48,y,12.38,0.72,LT_TEAL if i%2==0 else GRAY_BG)
    bx(s,0.48,y,0.55,0.72,NAVY)
    tb(s,0.48,y,0.55,0.72,num,18,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    tb(s,1.12,y+0.06,4.8,0.3,title,15,bold=True,color=NAVY)
    tb(s,1.12,y+0.38,10.5,0.28,sub,12,italic=True,color=GRAY_TXT)
note(s,"Reference: Kaplan & Sadock's Comprehensive Textbook of Psychiatry 11th ed.; Piaget J. Play, Dreams and Imitation in Childhood, 1951.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 1 — WHY PLAY MATTERS
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 1: Why Play Matters","Play is not a break from learning — it IS the learning",TEAL)

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Why Play Matters: The Science","Play drives development across every domain — simultaneously")
domains=[
    ("🧠 Cognitive",NAVY,["Problem-solving & logical reasoning","Executive function (working memory, inhibition, flexibility)","Attention, concentration, task persistence","Creativity and divergent thinking","Number sense, spatial reasoning, early literacy"]),
    ("💬 Language",TEAL,["Vocabulary acquisition during play narration","Pragmatic language (turn-taking, requesting)","Narrative skills through dramatic play","Joint attention — foundation of communication","Reading readiness through symbolic play"]),
    ("❤️ Emotional",RGBColor(0xB0,0x3A,0x2E),["Emotional regulation and frustration tolerance","Self-esteem and sense of mastery","Processing fears and anxieties through play","Resilience and coping with disappointment","Empathy development"]),
    ("🤝 Social",RGBColor(0x0E,0x83,0x6C),["Theory of mind — understanding others' perspectives","Negotiation, cooperation, conflict resolution","Peer relationship formation","Social rules and moral reasoning","Sharing, turn-taking, fairness"]),
]
for i,(title,col,pts) in enumerate(domains):
    x=0.28+i*3.27
    bx(s,x,1.35,3.12,5.55,GRAY_BG)
    bx(s,x,1.35,3.12,0.62,col)
    tb(s,x+0.06,1.38,3.0,0.56,title,15,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    for j,pt in enumerate(pts):
        tb(s,x+0.15,2.08+j*0.88,2.82,0.78,"▸ "+pt,13,color=DARK)
note(s,"Sources: AAP 2018 Play Policy Statement | Kaplan & Sadock Synopsis 12th ed. | Piaget J. 1954 The Construction of Reality in the Child")

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Why Play Matters: Brain & Physical Development","Play literally builds brain architecture in the first 1000 days and beyond")
bx(s,0.28,1.35,8.2,5.6,LT_TEAL)
tb(s,0.42,1.43,7.9,0.42,"Play and the Developing Brain",16,bold=True,color=NAVY)
brain_pts=[
    ("Synaptic pruning & myelination","Play experiences shape which neural circuits survive and strengthen"),
    ("Prefrontal cortex development","Rule-based play is the primary driver of executive function maturation"),
    ("Limbic system regulation","Emotionally arousing play (rough-and-tumble) trains stress-response circuits"),
    ("Cerebellar development","Physical play refines balance, coordination, and timing"),
    ("Hippocampal memory","Novel play environments create episodic and spatial memory traces"),
    ("Mirror neuron activation","Observational and imitative play builds social cognition circuits"),
]
for i,(title,desc) in enumerate(brain_pts):
    y=1.97+i*0.78
    bx(s,0.38,y,3.85,0.66,NAVY)
    tb(s,0.46,y+0.08,3.72,0.52,title,12,bold=True,color=WHITE)
    tb(s,4.35,y+0.09,3.96,0.54,"→  "+desc,12,color=DARK)

bx(s,8.65,1.35,4.45,5.6,AMBER)
tb(s,8.78,1.43,4.2,0.42,"Physical Benefits",15,bold=True,color=ORANGE)
phys=["Gross motor: balance, coordination, strength","Fine motor: hand-eye coordination, dexterity","Sensory integration (vestibular, proprioceptive)","Body schema and spatial awareness","Cardiovascular fitness and healthy weight","Sleep quality improvement"]
for i,p in enumerate(phys):
    tb(s,8.78,1.97+i*0.72,4.2,0.62,"✓ "+p,13,color=DARK)
note(s,"AAP 2018: 'Play is fundamentally important for learning 21st century skills.' | Murray et al. Pediatrics 2026 (PMID 42107976) — Recess Policy")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 2 — PIAGET'S STAGES
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 2: Piaget's Cognitive Play Stages","Practice Play → Functional → Symbolic → Constructive → Games with Rules",PURPLE)

# Piaget overview table
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Piaget's Cognitive Play Stages: Overview","Play is the mirror of the child's current cognitive stage — CORRECTED framework")
ph=["Stage","Age","Piaget Cognitive Period","Core Feature"]
px=[0.22,2.42,4.72,7.52]; pw=[2.12,2.22,2.72,5.72]
bx(s,0.22,1.3,12.98,0.55,PURPLE)
for h,cx,cw in zip(ph,px,pw):
    tb(s,cx+0.05,1.33,cw-0.08,0.48,h,13,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
piaget_rows=[
    ("1. Practice/Sensorimotor Play","0–2 years","Sensorimotor Stage","Repetition of actions for pleasure of mastery; mouthing, banging, dropping",PC[0]),
    ("2. Functional Play","12–18 months","Late Sensorimotor","Objects used per their function: comb to hair, phone to ear",PC[1]),
    ("3. Early Symbolic Play","18 months – 3 yr","Pre-operational","Pretend with own body; one object represents another; object substitution",PC[2]),
    ("4. Complex Symbolic / Dramatic Play","30 months – 5 yr","Pre-operational","Dramatic sequences; imaginary objects; assigns roles to others",PC[3]),
    ("5. Constructive Play","3 – 7 years","Pre-op → Concrete Operational","Building, drawing, creating — deliberate production of an outcome",PC[4]),
    ("6. Games with Rules","7 years+","Concrete Operational","Organised games with fixed, social rules; moral reasoning; sportsmanship",PC[5]),
]
alt=[GRAY_BG,WHITE]
for i,(name,age,period,feat,col) in enumerate(piaget_rows):
    y=1.93+i*0.84
    for cx,cw in zip(px,pw): bx(s,cx,y,cw,0.78,alt[i%2])
    tb(s,px[0]+0.05,y+0.1,pw[0]-0.08,0.6,name,12,bold=True,color=col)
    tb(s,px[1]+0.05,y+0.1,pw[1]-0.08,0.6,age,12,bold=True,color=ORANGE)
    tb(s,px[2]+0.05,y+0.1,pw[2]-0.08,0.6,period,12,italic=True,color=PURPLE)
    tb(s,px[3]+0.05,y+0.1,pw[3]-0.08,0.6,feat,12,color=DARK)
note(s,"Source: Piaget J. Play, Dreams and Imitation in Childhood. 1951 | K&S Comprehensive Textbook 11th ed., Section VIII: Play, pp.10654–10655")

# ── 6 individual Piaget stage slides ──────────────────────────────────────
piaget_slides=[
    ("Practice / Sensorimotor Play","Birth – 2 years","Sensorimotor Stage (Piaget)",PC[0],
     ["Repetition of actions purely for the pleasure of doing them",
      "0–12 months: mouthing, banging, dropping, throwing objects",
      "6–12 months: exploring object characteristics (moving parts, poking, pulling)",
      "Peek-a-boo; sound imitation games with caregiver",
      "No goal beyond the activity itself — mastery is the reward",
      "Object permanence emerges 8–12 months"],
     ["Respond to every coo and gesture — building secure attachment",
      "Tummy time from Day 1 — stimulates motor and sensory circuits",
      "Offer rattles, textured toys, mirrors, objects of different weight",
      "Narrate play aloud: 'You're dropping the block — it falls!'",
      "Play peek-a-boo — first 'object permanence' game",
      "Zero screens — sensorimotor play IS brain wiring"],
     "No social smile by 8 wks | No visual tracking | No mouthing or grasping by 4 mo | No response to name by 9 mo | No babbling by 12 mo",
     "Piaget: Sensorimotor Stage — all knowledge comes from physical action on objects. Six sub-stages of reflex → intentional action.",
     "K&S Comprehensive Textbook 11th ed., Section VIII: Play, p. 10654"),
    ("Functional Play","12 – 18 months","Late Sensorimotor / Early Pre-operational",PC[1],
     ["Child uses objects according to their actual function",
      "Pushes toy car, touches comb to hair, holds phone to ear",
      "Stacks blocks and containers with intent",
      "Imitates household actions: sweeping, stirring, wiping",
      "Proto-declarative pointing — 'look at that!'",
      "10–12 words by 12 months; 50+ words by 18 months"],
     ["Name objects during play: 'That's a cup — we drink from it!'",
      "Allow safe exploration — child-proof rather than restrict",
      "Follow the child's lead (child-directed play principle)",
      "Read board books together — point and name",
      "Encourage imitation games: waving, clapping, stirring",
      "Let child problem-solve before offering help"],
     "No single words by 16 mo | No pointing by 14 mo | Not imitating actions | No functional use of any object by 15 mo",
     "Object permanence is consolidated. Child now understands objects have defined, consistent functions — the basis of tool use and language.",
     "K&S Comprehensive Textbook 11th ed., Section VIII: Play, p. 10654"),
    ("Early Symbolic Play","18 months – 3 years","Pre-operational Stage",PC[2],
     ["Pretends using own body — pretends to eat, to sleep",
      "Uses another person as agent: 'feeds' mother",
      "Object substitution: a block becomes a car",
      "Sequences activities in pretend: cooks then eats",
      "Beginning of 'as if' thinking — one thing stands for another",
      "Imaginary play is starting to emerge"],
     ["Join in pretend play — take a cup of 'tea', eat the 'food'",
      "Supply open-ended toys: dolls, blocks, play kitchen, animals",
      "Narrate child's play: 'Your baby is hungry!'",
      "Limit screens: children learn symbolic thinking from people, not screens",
      "Use play to prepare for transitions: 'Let's pretend we go to the doctor'",
      "Do not correct the 'logic' of pretend — enter the child's world"],
     "No pretend play by 18 mo (M-CHAT-R red flag) | No object substitution by 24 mo | No two-word phrases by 24 mo | Rigid/stereotyped play only",
     "Symbol formation: the ability to let one thing represent another. This is ALSO the foundation of language, drawing, and mathematical thinking.",
     "K&S Comprehensive Textbook 11th ed., Section VIII: Play, p. 10654"),
    ("Complex Symbolic / Dramatic Play","30 months – 5 years","Pre-operational Stage",PC[3],
     ["Plans and acts out dramatic play sequences",
      "Uses imaginary objects: invisible tea, pretend fire",
      "Assigns roles to others: 'You be the patient, I'm the doctor'",
      "Develops narrative arcs: beginning, middle, end",
      "Imaginary companions (up to 50% of children, ages 3–10)",
      "Drawings add arms, legs, torso progressively"],
     ["Participate as a supporting character — do not take over",
      "Ask open questions: 'What happens next in your story?'",
      "Accept imaginary companions — developmentally healthy and common",
      "Provide dress-up clothes, puppets, art materials, doll house",
      "Use dramatic play to process fears, medical visits, family events",
      "Co-read narrative picture books — expands play vocabulary"],
     "No complex pretend by 36 mo | Cannot take on another's role | Cannot sequence 3-step scenarios | Persistent isolated rigid play",
     "Piaget: most advanced Pre-operational play. Doll/animal play reveals themes of family life — nurturance, discipline, sibling relationships, trauma.",
     "K&S Comprehensive 11th ed., Section VIII: Play, p. 10655: 'Animal/doll play can reveal re-enactment, fears, and fantasy — interpret with caution.'"),
    ("Constructive Play","3 – 7 years","Pre-operational → Concrete Operational",PC[4],
     ["Uses materials to BUILD or CREATE something with intention",
      "Building with blocks, Lego, construction toys",
      "Drawing, painting, clay — producing a planned outcome",
      "Puzzles, cutting and pasting, craft activities",
      "Most common type of play in preschool settings (~50% of play time)",
      "Combines sensorimotor skill with symbolic intent"],
     ["Provide building and art materials freely — blocks, playdough, crayons",
      "Ask 'What are you making?' to stimulate narrative thinking",
      "Do not impose your design — let child lead the construction",
      "Celebrate process, not just product: 'I love how you chose those colours'",
      "Build together — models problem-solving through collaboration",
      "Link to academic skills: 'How many blocks tall is your tower?'"],
     "Cannot hold or manipulate tools (pencil, scissors) by age 4 | No intentional construction by age 3.5 | Cannot plan a simple 2-step build",
     "Bridge between symbolic and logical thinking. Constructive play is associated with early math, spatial reasoning, and engineering skills.",
     "Piaget J. The Construction of Reality in the Child. Basic Books, 1954."),
    ("Games with Rules","7 years and beyond","Concrete Operational Stage",PC[5],
     ["Organised games with pre-established, fixed rules",
      "Rules understood as social contracts — not invented by the child",
      "Board games, card games, team sports, playground games",
      "Child can inhibit impulses to follow rules",
      "Moral understanding of fairness, cheating, winning and losing",
      "Negotiation of rules when setting up new games"],
     ["Teach sportsmanship explicitly: how to win and how to lose",
      "Introduce age-appropriate board games (ages 4–5 start simple)",
      "Allow natural conflict resolution before intervening",
      "Protect unstructured outdoor play and recess (AAP 2026)",
      "Limit over-scheduling — free rule-based play is the goal",
      "Monitor for bullying and exclusion in group games"],
     "Cannot follow rules of simple games by age 5 | Severe aggression when losing | Consistent exclusion from peer groups | Cheating without understanding why it's wrong",
     "Requires concrete operational thinking, theory of mind, executive function (inhibitory control, working memory), and emotional regulation — all together.",
     "Murray R et al. Pediatrics 2026 (PMID 42107976): recess improves attention, executive function, social-emotional learning, and academic outcomes."),
]

for name,age,period,col,what,impl,flags,devlink,ref in piaget_slides:
    s=prs.slides.add_slide(BL); bg(s,WHITE)
    hdr(s,"Piaget: "+name,f"{age}  |  {period}")
    badge(s,0.28,1.35,age,col,w=2.5)
    panel(s,0.28,1.93,6.0,3.3,"What Play Looks Like",what,LT_TEAL,col)
    panel(s,6.5,1.93,6.55,3.3,"Parental Implications",impl,AMBER,ORANGE)
    rfbar(s,flags,y=5.38)
    bx(s,0.28,6.15,12.78,1.05,GRAY_BG)
    tb(s,0.4,6.19,2.2,0.24,"Dev Link:",10,bold=True,color=PURPLE)
    tb(s,0.4,6.4,6.1,0.72,devlink,11,italic=True,color=DARK)
    tb(s,6.65,6.19,6.28,0.96,"📚 "+ref,11,italic=True,color=GRAY_TXT)


# ══════════════════════════════════════════════════════════════════════════
# SECTION 3 — HOW PLAY REFLECTS PIAGET'S COGNITIVE STAGES
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 3: Play as a Mirror of Cognitive Development","How each Piaget play type reflects the child's underlying cognitive stage",NAVY)

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Play Reflects Cognition: The Piaget Link","You can READ a child's cognitive stage by watching how they play")

bx(s,0.28,1.35,12.78,0.52,NAVY)
for txt,cx,cw in zip(["Piaget Play Stage","Cognitive Stage","What the Child CAN Do (Cognitively)","Clinical Implication"],
                      [0.3,2.58,5.18,8.78],[2.2,2.52,3.52,4.42]):
    tb(s,cx+0.04,1.38,cw-0.06,0.44,txt,12,bold=True,color=WHITE,align=PP_ALIGN.CENTER)

cog_rows=[
    ("Practice Play","Sensorimotor\n(0–2 yr)",
     "Learns by doing; no mental representation yet; action = thought",
     "Child who only mouths/bangs at 18 months has not reached representational thought"),
    ("Functional Play","Late Sensorimotor\n(12–18 mo)",
     "Object permanence established; cause-effect understood; deferred imitation begins",
     "Lack of functional play at 15 months is a strong signal of cognitive delay"),
    ("Early Symbolic","Pre-operational\n(2–7 yr)",
     "Mental representation present; egocentrism; animism; centration",
     "Absence of pretend at 18 months = absent symbol formation = M-CHAT-R item"),
    ("Complex Symbolic","Pre-operational\n(3–5 yr)",
     "Narrative sequencing; theory of mind emerging; decentration beginning",
     "Inability to sequence dramatic play by age 4 suggests pre-operational arrest"),
    ("Constructive","Pre-op → Concrete\n(4–7 yr)",
     "Conservation beginning; logical cause-effect in physical world; seriation",
     "Constructive play is the bridge to academic readiness — monitor in GDD"),
    ("Games with Rules","Concrete Operational\n(7+ yr)",
     "Logical operations; conservation; reversibility; class inclusion",
     "Inability to follow game rules by age 7 → executive function evaluation"),
]
alt=[GRAY_BG,WHITE]
for i,(play,cog,ability,clin) in enumerate(cog_rows):
    y=1.95+i*0.82
    for cx,cw in zip([0.3,2.58,5.18,8.78],[2.2,2.52,3.52,4.42]):
        bx(s,cx,y,cw,0.76,alt[i%2])
    tb(s,0.35,y+0.08,2.1,0.62,play,12,bold=True,color=PC[i])
    tb(s,2.63,y+0.08,2.42,0.62,cog,11,italic=True,color=PURPLE)
    tb(s,5.23,y+0.08,3.42,0.62,ability,11,color=DARK)
    tb(s,8.83,y+0.08,4.32,0.62,clin,11,italic=True,color=RGBColor(0xA8,0x18,0x18))
note(s,"Key principle: A child's play stage IS their cognitive stage made visible. This is Piaget's central insight — and the pediatrician's diagnostic window.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 4 — PARTEN'S STAGES
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 4: Parten's Social Play Stages","Unoccupied · Solitary · Onlooker · Parallel · Associative · Cooperative",RGBColor(0x0E,0x83,0x6C))

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Parten's 6 Social Play Stages: Overview","Mildred Parten (1932) — social participation, NOT cognitive complexity")
snames=["1\nUnoccupied","2\nSolitary","3\nOnlooker","4\nParallel","5\nAssociative","6\nCooperative"]
sages=["0–3 mo","0–2 yr","2–2.5 yr","2–3 yr","3–4 yr","4+ yr"]
sdescs=["Random\nmovements\nno goal","Plays alone\nself-absorbed","Watches peers\ndoes not join","Near others\nno interaction","Interacts &\nshares, no goal","Roles, rules\nshared outcome"]
bw=1.98
for i in range(6):
    x=0.28+i*2.13
    bx(s,x,1.35,bw,4.82,GRAY_BG)
    bx(s,x,1.35,bw,0.78,SC[i])
    tb(s,x+0.05,1.37,bw-0.08,0.48,snames[i],13,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    tb(s,x+0.05,1.82,bw-0.08,0.3,sages[i],11,italic=True,color=WHITE,align=PP_ALIGN.CENTER)
    tb(s,x+0.1,2.22,bw-0.16,1.0,sdescs[i],13,color=DARK,align=PP_ALIGN.CENTER)
    if i<5: tb(s,x+bw+0.05,3.55,0.2,0.35,"►",14,color=GRAY_TXT)
bx(s,0.28,6.25,12.77,0.32,LT_TEAL)
tb(s,0.32,6.27,12.7,0.28,"◄── Increasing Social Complexity  |  Earlier stages persist alongside later stages ──►",11,color=TEAL,align=PP_ALIGN.CENTER)
note(s,"Parten MB. Social participation among pre-school children. J Abnorm Soc Psychol. 1932;27(3):243–269.")

# Parten combined reference table
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Parten's Stages: Clinical Quick Reference","Social stage, what it looks like, parent action, red flag")
ph2=["Stage","Age","Social Behaviour","Key Parent Action","Red Flag"]
px2=[0.22,1.65,3.08,6.18,9.62]; pw2=[1.36,1.36,3.02,3.36,3.62]
bx(s,0.22,1.3,12.98,0.55,RGBColor(0x0E,0x83,0x6C))
for h,cx,cw in zip(ph2,px2,pw2):
    tb(s,cx+0.04,1.33,cw-0.06,0.48,h,12,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
parten_rows=[
    ("1. Unoccupied","0–3 mo","Random movement; no social play","Tummy time; respond to coos; face time","No social smile by 8 wks"),
    ("2. Solitary","0–2 yr","Plays alone; no peer interest","Safe space; sit nearby; narrate","Rigid/stereotyped solitary after age 3"),
    ("3. Onlooker","2–2.5 yr","Watches peers; asks; does not join","Allow observation; do NOT force entry","No peer interest by 3 yr"),
    ("4. Parallel","2–3 yr","Near peers; no interaction","Arrange proximity; duplicate toys","No peer awareness by 2.5 yr"),
    ("5. Associative","3–4 yr","Interacts, shares, no group goal","Teach turn-taking; small groups","No peer exchange by 3.5 yr"),
    ("6. Cooperative","4+ yr","Roles, rules, shared outcome","Protect free play; sportsmanship","Cannot follow rules by age 5"),
]
alt=[GRAY_BG,WHITE]
for i,(st,ag,beh,par,rf) in enumerate(parten_rows):
    y=1.93+i*0.84
    rc=alt[i%2]
    for cx,cw in zip(px2,pw2): bx(s,cx,y,cw,0.78,rc)
    tb(s,px2[0]+0.04,y+0.1,pw2[0]-0.06,0.6,st,12,bold=True,color=SC[i])
    tb(s,px2[1]+0.04,y+0.1,pw2[1]-0.06,0.6,ag,12,bold=True,color=ORANGE)
    tb(s,px2[2]+0.04,y+0.1,pw2[2]-0.06,0.6,beh,12,color=DARK)
    tb(s,px2[3]+0.04,y+0.1,pw2[3]-0.06,0.6,par,12,color=DARK)
    tb(s,px2[4]+0.04,y+0.1,pw2[4]-0.06,0.6,rf,11,italic=True,color=RED_TXT)
note(s,"Parten MB. 1932 | Kaplan & Sadock's Synopsis of Psychiatry 12th ed. — Preschool Developmental Milestones")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 5 — OBSERVATIONS
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 5: What to Observe During Play","Parent observations at home  ·  Pediatrician observations in the clinic",ORANGE)

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"What Pediatricians Observe During Play Assessment","Play is the pediatrician's most powerful developmental assessment tool")
bx(s,0.28,1.35,6.1,5.6,LT_TEAL)
tb(s,0.42,1.43,5.8,0.42,"Structure of Play (Piaget Lens)",16,bold=True,color=NAVY)
piaget_obs=[
    ("Sensorimotor","Does child mouth, bang, drop, explore object properties?"),
    ("Functional","Does child use objects for their intended purpose?"),
    ("Early Symbolic","Does child use one object to represent another? Pretend?"),
    ("Complex Symbolic","Does child plan dramatic sequences and assign roles?"),
    ("Constructive","Does child build/draw with intention and a goal?"),
    ("Games with Rules","Does child understand and follow game rules?"),
]
for i,(stage,q) in enumerate(piaget_obs):
    y=1.97+i*0.78
    bx(s,0.38,y,2.0,0.66,PC[i])
    tb(s,0.44,y+0.08,1.9,0.52,stage,12,bold=True,color=WHITE)
    tb(s,2.48,y+0.1,3.75,0.56,q,12,color=DARK)

bx(s,6.55,1.35,6.5,5.6,GREEN_BG)
tb(s,6.68,1.43,6.22,0.42,"Social Play Observations (Parten Lens)",16,bold=True,color=GREEN_DRK)
parten_obs=[
    "Does child play alone or seek out other children?",
    "Does child watch peers play? With interest or flat affect?",
    "Does child move toward other children or away?",
    "Does child imitate what nearby child is doing?",
    "Does child initiate interaction, share, or take turns?",
    "Does child participate in group games with rules?",
    "How does child handle losing or conflict?",
    "Does child use parent as a safe base during play?",
    "Does child show pleasure and affect during play?",
    "Does child make eye contact during play interactions?",
]
for i,obs in enumerate(parten_obs):
    tb(s,6.68,1.97+i*0.52,6.22,0.46,"✦ "+obs,12,color=DARK)
note(s,"K&S Comprehensive Textbook 11th ed., Section VIII: Play — 'Play is a primary mode of information gathering in the Infant & Toddler MSE.'")

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"What Parents Observe at Home","Practical guidance — what parents should watch for between visits")

obs_sections=[
    ("0–12 months\nSensorimotor",PC[0],[
        "Does baby respond to your face and smile?",
        "Does baby reach for and explore toys?",
        "Does baby look where an object fell or was hidden?",
        "Does baby vocalise in response to your talking?",
        "Does baby enjoy repetitive games (peek-a-boo)?",
    ]),
    ("12–24 months\nFunctional/Symbolic",PC[2],[
        "Does toddler use objects correctly (spoon to mouth)?",
        "Does toddler point to share interest?",
        "Does toddler begin pretend play (feeds doll)?",
        "Does toddler watch what other children are doing?",
        "Does toddler imitate your actions in play?",
    ]),
    ("2–4 years\nSymbolic/Constructive",PC[3],[
        "Does child create stories in play with characters?",
        "Does child play near (not with) other children?",
        "Does child start to interact and share in small groups?",
        "Does child build things with purpose?",
        "Does child accept others joining their play?",
    ]),
    ("4+ years\nCooperative/Rules",PC[5],[
        "Does child play in organised groups with rules?",
        "Does child handle losing without major meltdown?",
        "Does child negotiate roles in group play?",
        "Does child have friends they choose to play with?",
        "Does child respect others' boundaries in play?",
    ]),
]
for i,(title,col,qs) in enumerate(obs_sections):
    x=0.28+i*3.27
    bx(s,x,1.35,3.12,5.62,GRAY_BG)
    bx(s,x,1.35,3.12,0.72,col)
    tb(s,x+0.06,1.38,3.0,0.66,title,13,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    for j,q in enumerate(qs):
        tb(s,x+0.15,2.17+j*0.95,2.82,0.84,"? "+q,13,color=DARK)
note(s,"Parent education: normalise what is age-appropriate and clarify what warrants a call to the pediatrician.")

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Content of Play: What the Pediatrician Analyses","Beyond structure — the THEMES and AFFECT of play reveal the child's inner world")
bx(s,0.28,1.35,8.45,5.6,LT_TEAL)
tb(s,0.42,1.43,8.12,0.42,"Play Content Analysis (Kaplan & Sadock Framework)",16,bold=True,color=NAVY)
content_rows=[
    ("Toy choice","Young toddlers → dolls, dishes, animals, cars. Avoidance of all toys may indicate anxiety or autism."),
    ("Emotional themes","Aggression (dinosaurs, guns), nurturance (feeding dolls), separation (hiding games)."),
    ("Affect during play","Does the child show pleasure? Anxiety? Flat affect? Anger? Appropriate to play content?"),
    ("Doll/animal play\n(2.5–3 yr+)","Can reveal family dynamics: nurturance, discipline, sibling relationships, possible abuse."),
    ("Aggression in play","Does pretend aggression become real and physically hurtful? Boundary between fantasy and reality?"),
    ("Re-enactment themes","Repetitive play re-enacting a specific event may signal trauma. Interpret with caution."),
    ("Reaction to scary toys","Avoidance or domination by scary toys (sharks, guns) — note and explore."),
]
for i,(label,desc) in enumerate(content_rows):
    y=1.97+i*0.72
    bx(s,0.38,y,2.45,0.62,NAVY if i%2==0 else TEAL)
    tb(s,0.45,y+0.08,2.35,0.5,label,12,bold=True,color=WHITE)
    tb(s,2.95,y+0.09,5.65,0.56,desc,12,color=DARK)

bx(s,8.95,1.35,4.2,5.6,AMBER)
tb(s,9.08,1.43,3.95,0.42,"Relatedness During Play",15,bold=True,color=ORANGE)
relat=["Does child use parent as safe base?","Does child check back during exploration?","Does child engage examiner vs. parent?","Does child show separation anxiety?","Does child accept comfort when distressed?","Is affect range appropriate?","Does child make and maintain eye contact?","Does child show joint attention?","Does child show empathy in play?"]
for i,r in enumerate(relat):
    tb(s,9.08,1.97+i*0.52,3.95,0.46,"▸ "+r,12,color=DARK)
note(s,"K&S Comprehensive 11th ed., p.10655: 'The examiner must view play as a possible combination of re-enactment, fears, and fantasy.'")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 6 — RED FLAGS
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 6: Red Flags in Developmental Play","Age-specific warning signs across both Piaget and Parten dimensions",RED_TXT)

s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Red Flags Master Table: Piaget + Parten Combined","Stagnation on EITHER dimension beyond expected age requires action")
rfh=["Age","Expected Piaget Stage","Expected Parten Stage","Red Flag","Action"]
rfx=[0.22,1.72,3.82,5.92,9.52]; rfw=[1.42,2.02,2.02,3.52,3.72]
bx(s,0.22,1.3,12.98,0.55,RED_TXT)
for h,cx,cw in zip(rfh,rfx,rfw):
    tb(s,cx+0.04,1.33,cw-0.06,0.48,h,12,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
rf_rows=[
    ("0–3 mo","Practice\n(Sensorimotor)","Unoccupied",
     "No social smile; no tracking; no startle to sound",
     "Vision/hearing screen; ophthalmology; paeds neurology"),
    ("6–9 mo","Practice\n(Sensorimotor)","Solitary",
     "No object permanence; no reaching; no vocalisation",
     "Developmental evaluation; hearing ABR; vision"),
    ("12 mo","Functional play","Solitary",
     "No pointing; no words; no object use; no imitation",
     "Hearing screen; M-CHAT-R scheduled; SLP referral"),
    ("18 mo","Early Symbolic","Onlooker/Parallel",
     "No pretend play; no peer interest; no 2-word phrases",
     "M-CHAT-R; ASD assessment; SLP referral; WES if dysmorphic"),
    ("24 mo","Early Symbolic","Parallel",
     "No symbolic play; no 2-word phrases; isolated play",
     "Formal developmental evaluation; ASD/GDD workup"),
    ("36 mo","Complex Symbolic","Associative",
     "Rigid solitary only; no peer exchange; no narrative play",
     "ASD/GDD assessment; trio WES; social skills therapy"),
    ("5 yr","Constructive / Games","Cooperative",
     "Cannot follow rules; no group play; no intentional construction",
     "ADHD/ASD evaluation; executive function assessment"),
]
alt=[GRAY_BG,WHITE]
for i,(ag,pia,par,rf,act) in enumerate(rf_rows):
    y=1.93+i*0.72
    rc=alt[i%2]
    for cx,cw in zip(rfx,rfw): bx(s,cx,y,cw,0.66,rc)
    tb(s,rfx[0]+0.04,y+0.07,rfw[0]-0.06,0.54,ag,11,bold=True,color=TEAL)
    tb(s,rfx[1]+0.04,y+0.07,rfw[1]-0.06,0.54,pia,11,color=PURPLE)
    tb(s,rfx[2]+0.04,y+0.07,rfw[2]-0.06,0.54,par,11,color=SC[min(i,5)])
    tb(s,rfx[3]+0.04,y+0.07,rfw[3]-0.06,0.54,rf,11,bold=True,color=RED_TXT)
    tb(s,rfx[4]+0.04,y+0.07,rfw[4]-0.06,0.54,act,10,italic=True,color=GRAY_TXT)
note(s,"M-CHAT-R item: No pretend play and no pointing at 18 months are among the strongest ASD predictors in this tool.")


# ══════════════════════════════════════════════════════════════════════════
# SECTION 7 — NEURODEVELOPMENTAL CONDITIONS
# ══════════════════════════════════════════════════════════════════════════
sec_div("Section 7: Play in Neurodevelopmental Conditions","ASD · ADHD · GDD · DCD · Language Disorders · Trauma",RGBColor(0x1A,0x23,0x5E))

# ASD
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Play in Autism Spectrum Disorder (ASD)","The hallmark: social play (Parten) lags behind cognitive play (Piaget)")
bx(s,0.28,1.35,6.1,5.6,LT_TEAL)
tb(s,0.42,1.43,5.8,0.42,"Play Profile in ASD",16,bold=True,color=NAVY)
asd_play=[
    ("Piaget stage","May reach Symbolic/Constructive — cognitive play CAN be intact"),
    ("Parten stage","Typically stuck at Solitary or Parallel — the KEY dissociation"),
    ("Symbolic play","Reduced spontaneous pretend; scripted/echolalic play common"),
    ("Functional play","May over-focus on one function (spinning, lining up)"),
    ("Constructive play","Often a relative strength — Lego, puzzles, building"),
    ("Joint attention","Severely impaired — core deficit underlying all play problems"),
    ("Content","Restricted, repetitive themes; intense narrow interests"),
    ("Affect","Variable — may appear flat; may have intense emotional reactions"),
]
for i,(label,desc) in enumerate(asd_play):
    y=1.97+i*0.62
    bx(s,0.38,y,2.15,0.54,NAVY if i%2==0 else TEAL)
    tb(s,0.44,y+0.07,2.08,0.44,label,11,bold=True,color=WHITE)
    tb(s,2.65,y+0.08,3.55,0.48,desc,12,color=DARK)
bx(s,6.55,1.35,6.5,2.88,LT_PURPLE)
tb(s,6.68,1.43,6.22,0.42,"Parental Implications",15,bold=True,color=PURPLE)
asd_par=["Enter child's preferred play FIRST — join before leading","Do not force eye contact; use play to build it naturally","Follow the child's lead: expand, don't redirect","Scripted play themes are an entry point — use them","Joint attention activities: bubbles, music, cause-effect toys","Reduce screen time — screens worsen social isolation in ASD"]
for i,p in enumerate(asd_par):
    tb(s,6.68,1.97+i*0.42,6.22,0.38,"▸ "+p,12,color=DARK)
bx(s,6.55,4.35,6.5,2.6,AMBER)
tb(s,6.68,4.43,6.22,0.42,"Interventions Targeting Play",15,bold=True,color=ORANGE)
asd_int=["ESDM (Early Start Denver Model) — play-based","PRT (Pivotal Response Treatment) — child-led","JASPER — Joint Attention, Symbolic Play, Engagement","Floor Time (Greenspan) — follow the child's lead","Social skills groups using cooperative play","TF-CBT play therapy if trauma co-occurs"]
for i,p in enumerate(asd_int):
    tb(s,6.68,4.92+i*0.37,6.22,0.34,"✓ "+p,12,color=DARK)
rfbar(s,"No pretend play by 18 mo | No pointing by 14 mo | No joint attention | No varied spontaneous play | Restricted play themes")
note(s,"Sandbank M et al. BMJ 2023 (PMID 37963634): Project AIM meta-analysis — play-based interventions most effective in early ASD")

# ADHD
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Play in ADHD","Play disrupted by inattention, impulsivity, and emotional dysregulation — NOT cognitive delay")
bx(s,0.28,1.35,6.1,3.75,LT_TEAL)
tb(s,0.42,1.43,5.8,0.42,"Play Profile in ADHD",16,bold=True,color=NAVY)
adhd_rows=[
    ("Piaget stage","Age-appropriate — cognitive play stages typically intact"),
    ("Parten stage","Can reach Cooperative but frequently disrupted by impulsivity"),
    ("Attention span","Short — frequently shifts activities; does not complete play"),
    ("Rule-based games","Violates rules impulsively; cannot wait turns; rule enforcement causes conflict"),
    ("Associative/Cooperative","Interrupts, takes over, responds aggressively when corrected"),
    ("Emotional dysregulation","Disproportionate reaction to losing; meltdowns over perceived unfairness"),
    ("Peer relationships","Often excluded; labelled as 'rough' or 'bossy' by peers"),
]
for i,(label,desc) in enumerate(adhd_rows):
    y=1.97+i*0.47
    bx(s,0.38,y,2.15,0.42,NAVY if i%2==0 else TEAL)
    tb(s,0.44,y+0.06,2.08,0.34,label,11,bold=True,color=WHITE)
    tb(s,2.65,y+0.07,3.55,0.36,desc,12,color=DARK)
bx(s,0.28,5.28,6.1,1.62,GRAY_BG)
tb(s,0.42,5.35,5.8,0.38,"Interventions for Play",13,bold=True,color=NAVY)
adhd_int=["Shorter play sessions with defined start/end","Structured transitions between activities","Immediate praise for rule-following","Social skills training in play context","Reduce competitive play pressure initially"]
for i,p in enumerate(adhd_int):
    tb(s,0.42,5.78+i*0.22,5.8,0.2,"✓ "+p,11,color=DARK)
bx(s,6.55,1.35,6.5,5.55,AMBER)
tb(s,6.68,1.43,6.22,0.42,"Parental Implications",16,bold=True,color=ORANGE)
adhd_par=["Praise attempts at rule-following, not just outcomes","Use visual timers so child knows when their turn comes","Pre-game briefing: 'In this game, we take turns — that means waiting'","Teach emotion vocabulary for losing: 'That's disappointing'","Choose games with shorter duration initially","Avoid high-competitive games until regulation improves","Practice losing at home in low-stakes situations","Debrief after peer play: what went well, what was hard","Work with school on recess supervision structure","Consider OT referral if sensory-seeking disrupts group play"]
for i,p in enumerate(adhd_par):
    tb(s,6.68,1.97+i*0.5,6.22,0.44,"▸ "+p,13,color=DARK)
rfbar(s,"No group play by 5 yr despite average cognition | Consistent peer rejection | Play aggression escalating | Never completes any play activity")
note(s,"Executive function in play = inhibitory control + working memory + cognitive flexibility. ADHD impairs all three simultaneously.")

# GDD
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Play in Global Developmental Delay (GDD) / Intellectual Disability","Both Piaget AND Parten stages lag — but sequence is preserved")
bx(s,0.28,1.35,6.1,3.95,LT_TEAL)
tb(s,0.42,1.43,5.8,0.42,"Play Profile in GDD",16,bold=True,color=NAVY)
gdd_rows=[
    ("Sequence","SAME sequence as typical development — just slower (K&S: 'similar sequence hypothesis')"),
    ("Piaget stage","Lags behind chronological age by 6–18+ months depending on severity"),
    ("Parten stage","Also lags — both frameworks delayed but move together (unlike ASD)"),
    ("Key distinction","In GDD: BOTH social and cognitive play lag. In ASD: social lags more than cognitive."),
    ("Play content","Less varied; simpler themes; shorter sequences; more sensorimotor even in older children"),
    ("Sensory play","Often a strength and entry point for engagement"),
]
for i,(label,desc) in enumerate(gdd_rows):
    y=1.97+i*0.58
    bx(s,0.38,y,2.0,0.5,NAVY if i%2==0 else TEAL)
    tb(s,0.44,y+0.07,1.93,0.4,label,11,bold=True,color=WHITE)
    tb(s,2.5,y+0.07,3.7,0.46,desc,12,color=DARK)
bx(s,0.28,5.48,6.1,1.45,GRAY_BG)
tb(s,0.42,5.54,5.8,0.38,"Adapting Expectations",13,bold=True,color=NAVY)
tb(s,0.42,5.96,5.8,0.85,"Use DEVELOPMENTAL age (not chronological age) for both Piaget and Parten expectations. A 4-year-old with developmental age of 2 should be evaluated at the 18-month play milestones.",12,italic=True,color=DARK)
bx(s,6.55,1.35,6.5,5.6,AMBER)
tb(s,6.68,1.43,6.22,0.42,"Parental Implications",16,bold=True,color=ORANGE)
gdd_par=["Adapt toy selection to developmental age, not chronological age","Celebrate EACH stage achieved, however late","Open-ended sensory toys are often the best entry point","Play-based OT and SLP targets each Piaget stage specifically","Arrange peer play with younger or similar-developmental-age children","Avoid comparing to age-peers — use developmental benchmarks","Use repetition: children with GDD need more practice per stage","Video model play skills — show and then do together","Ask 'What is my child's play age?' not 'Why is my child behind?'","Sibling play is therapeutic — teach siblings how to support"]
for i,p in enumerate(gdd_par):
    tb(s,6.68,1.97+i*0.52,6.22,0.46,"▸ "+p,13,color=DARK)
rfbar(s,"No functional play by 18 mo | No symbolic play by 3 yr | Both Piaget and Parten stages > 6 months behind | No progression over 6-month observation period")
note(s,"K&S Comprehensive 11th ed. p.10989: 'Similar sequence hypothesis' — children with ID follow same developmental sequence, just more slowly.")

# DCD + Language
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"Play in DCD, Language Disorders & Trauma","How specific conditions affect particular play dimensions")
conds=[
    ("Developmental\nCoordination\nDisorder (DCD)",RGBColor(0x0E,0x83,0x6C),[
        "Piaget stage: Constructive and Games with Rules affected",
        "Parten stage: often normal social interest",
        "Physical play (gross motor) avoided due to clumsiness",
        "Fine motor tasks (drawing, building) frustrating",
        "Peer exclusion from team sports → social withdrawal",
        "Intervention: OT play-based therapy; adapted sports",
        "Parent: reduce pressure on physical skill; focus on effort",
    ]),
    ("Developmental\nLanguage\nDisorder (DLD)",RGBColor(0x1E,0x6B,0xAD),[
        "Piaget stage: Symbolic/Constructive typically intact",
        "Parten stage: Associative and Cooperative disrupted",
        "Play ideas present but cannot communicate them",
        "Exclusion from play due to language barriers",
        "Frustration in group play leads to aggression",
        "Intervention: SLP targeting pragmatics in play context",
        "Parent: be the interpreter; narrate child's intentions",
    ]),
    ("Trauma /\nACE Exposure",RGBColor(0xB0,0x3A,0x2E),[
        "Regression to earlier Piaget stages under stress",
        "Parten: hypervigilance disrupts Onlooker → Parallel",
        "Repetitive re-enactment in symbolic play (not always pathological)",
        "Cooperative play requires safety — trauma blocks it",
        "Themes of danger, separation, aggression in doll play",
        "Intervention: Trauma-Focused Play Therapy (TF-CBT)",
        "Parent: do not interrupt re-enactment play; stay calm nearby",
    ]),
    ("Cerebral Palsy\n/ Physical\nDisability",PC[4],[
        "Cognitive play stages typically intact",
        "Physical limitations may restrict Constructive play",
        "Sensorimotor play adapted for motor ability",
        "Assistive technology enables play participation",
        "Peer play disrupted by mobility/communication limits",
        "Intervention: AAC + adapted play environments",
        "Parent: remove barriers; focus on what IS possible",
    ]),
]
for i,(title,col,pts) in enumerate(conds):
    x=0.28+i*3.27
    bx(s,x,1.35,3.12,5.72,GRAY_BG)
    bx(s,x,1.35,3.12,0.72,col)
    tb(s,x+0.06,1.38,3.0,0.66,title,13,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    for j,pt in enumerate(pts):
        tb(s,x+0.15,2.17+j*0.76,2.82,0.68,"▸ "+pt,12,color=DARK)
note(s,"DCD: Kirby A et al. | DLD: Bishop DVM et al. | Trauma: Cohen JA et al. TF-CBT")


# ══════════════════════════════════════════════════════════════════════════
# FINAL SLIDES
# ══════════════════════════════════════════════════════════════════════════

# Key messages
s=prs.slides.add_slide(BL); bg(s,NAVY)
bx(s,0,0,13.333,1.22,RGBColor(0x06,0x1A,0x38))
bx(s,0,1.12,13.333,0.1,GOLD)
tb(s,0,0.08,13.333,0.7,"Key Take-Home Messages",32,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
tb(s,0,0.76,13.333,0.38,"For developmental pediatricians and parents",15,italic=True,color=RGBColor(0xCC,0xE0,0xFF),align=PP_ALIGN.CENTER)
msgs=[
    ("1","Play IS development","It is not a break from learning — it IS the primary vehicle for all developmental domains."),
    ("2","Piaget: HOW the child plays","Six cognitive stages — Practice → Functional → Symbolic → Constructive → Games with Rules."),
    ("3","Parten: WITH WHOM","Six social stages — Unoccupied to Cooperative. Independent, complementary framework."),
    ("4","Dissociation is diagnostic","ASD: social (Parten) lags behind cognitive (Piaget). GDD: both lag together. DLD: social lags alone."),
    ("5","Parents are co-therapists","Their role evolves: Responder → Observer → Facilitator → Coach → Supporter."),
    ("6","Play content reveals the child","Themes, affect, toy choice, and aggression in play reflect the child's emotional world."),
    ("7","Red flags need timely action","Stagnation at any stage beyond expected age warrants screening and referral."),
    ("8","Protect play time","Screens, over-scheduling, and lack of free play are modifiable risk factors for developmental delay."),
]
for i,(num,title,body) in enumerate(msgs):
    row=i%4; col_i=i//4
    x=0.22+col_i*6.6; y=1.35+row*1.5
    bx(s,x,y,6.3,1.35,WHITE)
    bx(s,x,y,0.58,1.35,PC[min(i,5)])
    tb(s,x,y,0.58,1.35,num,20,bold=True,color=WHITE,align=PP_ALIGN.CENTER)
    tb(s,x+0.66,y+0.07,5.48,0.42,title,14,bold=True,color=NAVY)
    tb(s,x+0.66,y+0.52,5.48,0.72,body,12,color=DARK)
bx(s,0,7.08,13.333,0.42,TEAL)
tb(s,0,7.11,13.333,0.36,'"Play is the language of childhood." — Piaget 1951 | Parten 1932 | K&S 11th ed.',13,bold=True,italic=True,color=WHITE,align=PP_ALIGN.CENTER)

# References
s=prs.slides.add_slide(BL); bg(s,WHITE)
hdr(s,"References & Further Reading")
refs=[
    "1.  Piaget J. Play, Dreams and Imitation in Childhood (La formation du symbole chez l'enfant). W.W. Norton, New York, 1951.",
    "2.  Piaget J. The Construction of Reality in the Child. Basic Books, New York, 1954.",
    "3.  Parten MB. Social participation among pre-school children. J Abnorm Soc Psychol. 1932;27(3):243–269.",
    "4.  Kaplan & Sadock's Comprehensive Textbook of Psychiatry, 11th ed. — Section VIII: Play (Infant & Toddler MSE), pp.10654–10655.",
    "5.  Kaplan & Sadock's Synopsis of Psychiatry, 12th ed. — Developmental Milestones: Preschoolers and School-Age Children.",
    "6.  American Academy of Pediatrics. 'The Power of Play.' Pediatrics 2018;142(3):e20182058.",
    "7.  Murray R et al. 'The Crucial Role of Recess in School: Policy Statement.' Pediatrics 2026. PMID 42107976.",
    "8.  Schneider M et al. 'Parent-Child Play and Externalizing/Internalizing Behaviour.' Front Psychol 2022. PMID 35586226.",
    "9.  Sandbank M et al. 'Autism intervention meta-analysis (Project AIM).' BMJ 2023. PMID 37963634.",
    "10. Bal M et al. 'Screen time, language development, and executive function.' PLoS One 2024. PMID 39724067.",
    "11. Vygotsky LS. Mind in Society: Development of Higher Psychological Processes. Harvard University Press, 1978.",
    "12. Greenspan SI, Wieder S. Engaging Autism: Using the Floortime Approach. Da Capo Press, 2006.",
    "13. Cohen JA et al. Trauma-Focused Cognitive-Behavioral Therapy for Children. Guilford Press, 2006.",
]
for i,ref in enumerate(refs):
    tb(s,0.38,1.35+i*0.43,12.58,0.38,ref,11,color=DARK)
bx(s,0,7.08,13.333,0.42,NAVY)
tb(s,0,7.11,13.333,0.36,"Seminar for Developmental Pediatricians | Mixed Audience | 60–90 min | July 2026",12,italic=True,color=WHITE,align=PP_ALIGN.CENTER)


# ── SAVE ──────────────────────────────────────────────────────────────────
out="/tmp/workspace/play-seminar/Piaget_Play_Seminar_Complete.pptx"
buf=BytesIO()
prs.save(buf)
with open(out,"wb") as f: f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/play-seminar && python build_piaget_seminar.py 2>&1

Running Command

ls -lh /tmp/workspace/play-seminar/Piaget_Play_Seminar_Complete.pptx

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

What time tommorow

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Download the Piaget Play Seminar PPTX (31 slides) — ready now

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.