/* 🐍 Python for Kids course — light, big, friendly. Scoped to #kidsGame .pc */
#kidsGame .pc{--ink:#1f2937;--soft:#6b7280;--bg:#f6faff;--card:#fff;--line:#dbe7f5;--blue:#3b82f6;--blue2:#dbeafe;--green:#16a34a;--green2:#dcfce7;--orange:#f59e0b;--pink:#ec4899;--red:#dc2626;
  position:relative;max-width:1080px;margin:0 auto;padding:10px 12px 28px;background:var(--bg);border-radius:22px;color:var(--ink);
  font-family:Cairo,"Segoe UI",Tahoma,system-ui,sans-serif;font-size:18px;line-height:1.55;box-sizing:border-box;overflow-x:hidden}
#kidsGame .pc *,#kidsGame .pc *::before,#kidsGame .pc *::after{box-sizing:border-box}
#kidsGame .pc :where(button){font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
#kidsGame .pc :where(button:disabled){cursor:default}
#kidsGame .pc [hidden]{display:none!important}

/* top bar */
#kidsGame .pc-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
#kidsGame .pc-title{flex:1;font-weight:800;font-size:22px;text-align:center;line-height:1.3}
#kidsGame .pc-ib{width:48px;height:48px;border-radius:16px;border:2px solid var(--line);background:#fff;font-size:24px;display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0}
#kidsGame .pc-logo{border-color:transparent;background:transparent}

/* guide */
#kidsGame .pc-guide{display:flex;align-items:flex-start;gap:10px;margin:8px 0 14px}
#kidsGame .pc-av{font-size:44px;line-height:1;flex:none;animation:pcBob 2.4s ease-in-out infinite}
#kidsGame .pc-say{position:relative;flex:1;background:#fff;border:2px solid var(--blue2);border-radius:18px;padding:10px 14px;font-weight:700;font-size:19px;box-shadow:0 3px 0 #e3edf9}
#kidsGame .pc-say.pop{animation:pcPop .3s ease}
@keyframes pcBob{50%{transform:translateY(-4px)}}
@keyframes pcPop{0%{transform:scale(.97)}60%{transform:scale(1.02)}100%{transform:none}}

/* buttons */
#kidsGame .pc-btn{white-space:nowrap;border:0;border-radius:999px;padding:12px 24px;font-weight:800;font-size:19px;background:var(--blue);color:#fff;box-shadow:0 4px 0 #1d4ed8;min-height:52px}
#kidsGame .pc-btn:active{transform:translateY(2px);box-shadow:0 2px 0 #1d4ed8}
#kidsGame .pc-btn.go{background:var(--green);box-shadow:0 4px 0 #15803d}
#kidsGame .pc-btn.run{background:var(--green);box-shadow:0 4px 0 #15803d;font-size:21px;padding:12px 30px}
#kidsGame .pc-btn.run.stop{background:#ef4444;box-shadow:0 4px 0 #b91c1c}
#kidsGame .pc-btn.ghost{background:#fff;color:var(--blue);border:2px solid var(--blue2);box-shadow:0 3px 0 var(--blue2)}
#kidsGame .pc-btn:disabled{opacity:.45;box-shadow:none}
#kidsGame .pc-small{border:2px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-weight:700;font-size:16px;min-height:44px}
#kidsGame .pc-small.sure{border-color:var(--red);color:var(--red)}

/* map */
#kidsGame .pc-map{display:grid;grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:14px}
#kidsGame .pc-bub{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:14px 8px 12px;border-radius:24px;border:3px solid var(--line);background:#fff;box-shadow:0 5px 0 #e3edf9;text-align:center;min-height:170px}
#kidsGame .pc-bub.open{border-color:#93c5fd}
#kidsGame .pc-bub.next{border-color:var(--green);box-shadow:0 5px 0 #86efac;animation:pcGlow 1.6s ease-in-out infinite}
#kidsGame .pc-bub.done{border-color:#fcd34d;background:#fffbeb;box-shadow:0 5px 0 #fde68a}
#kidsGame .pc-bub.locked{opacity:.55;filter:grayscale(.6)}
#kidsGame .pc-bub.shake{animation:pcShake .4s}
#kidsGame .pc-bn{position:absolute;top:8px;inset-inline-start:10px;width:30px;height:30px;border-radius:50%;background:var(--blue);color:#fff;font-weight:800;font-size:16px;display:flex;align-items:center;justify-content:center}
#kidsGame .pc-bi{font-size:46px;line-height:1.15}
#kidsGame .pc-bt{font-weight:800;font-size:18px;line-height:1.3}
#kidsGame .pc-bp{display:flex;gap:8px;font-size:14px;color:var(--soft);font-weight:700}
#kidsGame .pc-bp .ok{color:var(--green)}
#kidsGame .pc-bs{font-size:15px;letter-spacing:1px}
#kidsGame .pc-foot{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:center;margin-top:20px}
@keyframes pcGlow{50%{transform:translateY(-3px)}}
@keyframes pcShake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

/* lesson tabs */
#kidsGame .pc-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
#kidsGame .pc-tab{border:3px solid var(--line);background:#fff;border-radius:18px;padding:12px 8px;font-weight:800;font-size:20px;min-height:58px}
#kidsGame .pc-tab.on{border-color:var(--blue);background:var(--blue2);color:#1e3a8a}
#kidsGame .pc-tab small{font-size:15px;color:var(--soft)}
#kidsGame .pc-exsteps{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:6px}
#kidsGame .pc-exs{border:2px solid var(--line);background:#fff;border-radius:999px;padding:6px 14px;font-weight:700;font-size:16px;min-height:44px}
#kidsGame .pc-exs b{display:inline-flex;width:26px;height:26px;border-radius:50%;background:#e5e7eb;align-items:center;justify-content:center;font-size:14px}
#kidsGame .pc-exs.on{border-color:var(--blue);background:var(--blue2)}
#kidsGame .pc-exs.on b{background:var(--blue);color:#fff}
#kidsGame .pc-exs.done b{background:#fef3c7}
#kidsGame .pc-exs.lock{opacity:.5}
#kidsGame .pc-againrow{text-align:center;margin-top:18px}

/* slides */
#kidsGame .pc-slide{background:#fff;border:3px solid var(--line);border-radius:26px;padding:18px 14px;box-shadow:0 5px 0 #e3edf9;animation:pcIn .35s ease}
@keyframes pcIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#kidsGame .pc-art{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;min-height:120px;padding:8px 4px 14px;background:radial-gradient(circle at 50% 40%,#eff6ff 0,#fff 70%);border-radius:20px}
#kidsGame .pc-it{border:2px solid #e0eaf7;background:#fff;border-radius:18px;padding:6px 12px;font-size:34px;line-height:1.25;min-width:64px;min-height:64px;box-shadow:0 3px 0 #e3edf9;transition:transform .15s}
#kidsGame .pc-it.big{font-size:58px;border-color:transparent;box-shadow:none;background:transparent}
#kidsGame .pc-it.cd{font-family:"Cascadia Code",Consolas,"Courier New",monospace;font-size:24px;font-weight:700;color:#7c3aed;background:#faf5ff;border-color:#e9d5ff}
#kidsGame .pc-it.run{background:var(--green);color:#fff;border-color:var(--green);font-size:30px}
#kidsGame .pc-it:hover{transform:translateY(-2px)}
#kidsGame .pc-it.pop{animation:pcTap .4s}
@keyframes pcTap{40%{transform:scale(1.15)}}
#kidsGame .pc-con2{font-size:30px;color:#94a3b8;font-weight:800}
#kidsGame .pc[dir=rtl] .pc-con2{display:inline-block;transform:scaleX(-1)}
#kidsGame .pc-stext{font-size:21px;font-weight:700;text-align:center;margin:14px 6px 6px;line-height:1.7}
#kidsGame .pc-sx{display:grid;gap:10px;margin-top:12px}
#kidsGame .pc-sout{background:#0f172a0a;border:2px dashed #cbd5e1;border-radius:14px;padding:6px 12px;cursor:pointer}
#kidsGame .pc-sout pre{margin:0;font-family:"Cascadia Code",Consolas,monospace;font-size:17px;white-space:pre-wrap;color:#0f5132}
#kidsGame .pc-snav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}
#kidsGame .pc-dots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;flex:1;min-width:0}
#kidsGame .pc-dot{width:14px;height:14px;border-radius:50%;border:0;background:#cbd5e1;padding:0}
#kidsGame .pc-dot.on{background:var(--blue);transform:scale(1.25)}

/* code views */
#kidsGame .pc-code{display:flex;background:#fffef8;border:2px solid #e5e7eb;border-radius:16px;overflow:hidden;direction:ltr;text-align:left;font-family:"Cascadia Code",Consolas,"Courier New",monospace;font-size:17px;line-height:28px}
#kidsGame .pc-gut{flex:none;padding:10px 6px;background:#f1f5f9;color:#94a3b8;text-align:right;min-width:34px;user-select:none;font-size:14px;line-height:28px}
#kidsGame .pc-gut div{height:28px}
#kidsGame .pc-scr{flex:1;overflow-x:auto;overflow-y:hidden;min-width:0}
#kidsGame .pc-box{position:relative;display:inline-block;min-width:100%;vertical-align:top}
#kidsGame .pc-mir{margin:0;padding:10px 12px;white-space:pre;font:inherit;line-height:28px;tab-size:4;min-height:48px}
#kidsGame .pc-mir .ln{height:28px;border-radius:6px;padding:0 2px;margin:0 -2px;unicode-bidi:plaintext;direction:ltr;text-align:left}
#kidsGame .pc-mir .ln.cur{background:#fef9c3;box-shadow:inset 4px 0 0 #f59e0b}
#kidsGame .pc-mir .ln.err{background:#fee2e2;box-shadow:inset 4px 0 0 #dc2626}
#kidsGame .pc-ta{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:10px 12px;border:0;outline:none;resize:none;overflow:hidden;background:transparent;color:transparent;caret-color:#111;
  font:inherit;line-height:28px;white-space:pre;tab-size:4;direction:ltr;text-align:left;unicode-bidi:plaintext}
#kidsGame .pc-ta::selection{background:#bfdbfe;color:transparent}
#kidsGame .pc-code.ed{min-height:150px;border-color:#93c5fd;box-shadow:0 0 0 4px #eff6ff}
#kidsGame .pc-code.ed:focus-within{border-color:var(--blue)}
#kidsGame .pc-code .k{color:#7c3aed;font-weight:700}
#kidsGame .pc-code .s{color:#15803d}
#kidsGame .pc-code .n{color:#c2410c}
#kidsGame .pc-code .b{color:#0369a1;font-weight:700}
#kidsGame .pc-code .v{color:#1f2937}
#kidsGame .pc-code .o{color:#64748b}
#kidsGame .pc-code .c{color:#94a3b8;font-style:italic}
#kidsGame .pc-code .x{color:#dc2626;text-decoration:wavy underline}
#kidsGame .pc-code.ro .tap{cursor:pointer;border-radius:5px}
#kidsGame .pc-code.ro .tap:hover{background:#e0f2fe}
#kidsGame .pc-code.ro .tap.on{background:#fde68a;outline:2px solid #f59e0b}

/* chips & rows */
#kidsGame .pc-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
#kidsGame .pc-chips-t{font-weight:800;color:var(--soft);font-size:16px}
#kidsGame .pc-chip{border:2px solid #e9d5ff;background:#faf5ff;color:#6d28d9;border-radius:12px;padding:6px 12px;font-family:"Cascadia Code",Consolas,monospace!important;font-size:16px;min-height:44px}
#kidsGame .pc-runrow{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px}
#kidsGame .pc-nav{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:14px}

/* two columns */
#kidsGame .pc-two{display:grid;gap:14px}
#kidsGame .pc-left,#kidsGame .pc-right{min-width:0}
@media (min-width:860px){#kidsGame .pc-two{grid-template-columns:1.15fr 1fr;align-items:start}}

/* predict choices */
#kidsGame .pc-choices{display:grid;gap:10px}
#kidsGame .pc-choice{text-align:start;border:3px solid var(--line);background:#fff;border-radius:16px;padding:10px 14px;box-shadow:0 4px 0 #e3edf9;min-height:56px}
#kidsGame .pc-choice pre{margin:0;font-family:"Cascadia Code",Consolas,monospace;font-size:17px;white-space:pre-wrap}
#kidsGame .pc-choice:not(:disabled):hover{border-color:#93c5fd}
#kidsGame .pc-choice.picked{border-color:var(--blue);background:var(--blue2)}
#kidsGame .pc-choice.right{border-color:var(--green);background:var(--green2)}
#kidsGame .pc-choice.wrong{border-color:#fca5a5;background:#fef2f2}
#kidsGame .pc-choice:disabled:not(.picked):not(.right){opacity:.6}
#kidsGame .pc-choices.small .pc-choice{padding:4px 10px;min-height:0;box-shadow:none}
#kidsGame .pc-choices.small .pc-choice pre{font-size:14px}
#kidsGame .pc-conwrap{margin-top:12px}

/* console */
#kidsGame .pc-con{background:#fff;border:3px solid #bbf7d0;border-radius:16px;overflow:hidden;text-align:left}
#kidsGame .pc-con-h{background:#f0fdf4;color:#166534;font-weight:800;font-size:15px;padding:4px 12px;font-family:Cairo,"Segoe UI",sans-serif}
#kidsGame .pc-con-b{min-height:110px;max-height:340px;overflow:auto;padding:8px 12px;font-family:"Cascadia Code",Consolas,monospace;font-size:17px;line-height:1.6}
#kidsGame .pc-con-ph{color:#94a3b8;font-family:Cairo,"Segoe UI",sans-serif;text-align:center;padding-top:26px}
#kidsGame .pc-ol{white-space:pre-wrap;word-break:break-word;border-radius:6px;cursor:pointer;unicode-bidi:plaintext;text-align:start}
#kidsGame .pc-ol:hover{background:#f0fdf4}
#kidsGame .pc-ol .in{color:#1d4ed8;font-weight:700;background:#eff6ff;border-radius:4px}
#kidsGame .pc-inwrap{display:inline-flex;gap:6px;align-items:center;vertical-align:middle;margin:2px 0}
#kidsGame .pc-in{font:inherit;font-size:17px;border:2px solid var(--blue);border-radius:10px;padding:4px 10px;width:12em;max-width:56vw;background:#eff6ff;outline:none;animation:pcGlow 1.4s ease-in-out infinite}
#kidsGame .pc-send{border:0;background:var(--blue);color:#fff;border-radius:10px;width:44px;height:38px;font-size:20px}
#kidsGame .pc-errbox{background:#fef2f2;border-top:2px solid #fecaca;color:#991b1b;padding:10px 12px;font-weight:700;font-size:17px;font-family:Cairo,"Segoe UI",sans-serif;text-align:start}

/* goal */
#kidsGame .pc-goal{border:3px dashed #86efac;background:#f0fdf4;border-radius:16px;padding:6px 12px;margin-bottom:12px}
#kidsGame .pc-goal-h{font-weight:800;color:#166534;font-size:16px}
#kidsGame .pc-goal pre{margin:4px 0;font-family:"Cascadia Code",Consolas,monospace;font-size:17px;white-space:pre-wrap;text-align:start;unicode-bidi:plaintext}

/* make / badge / picks / gallery */
#kidsGame .pc-ph{margin:0 0 10px;font-size:22px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#kidsGame .pc-badge{margin-top:14px;background:#fffbeb;border:3px solid #fcd34d;border-radius:20px;padding:12px;text-align:center;animation:pcIn .4s ease}
#kidsGame .pc-badge-h{font-weight:800;color:#92400e}
#kidsGame .pc-badge-b{display:flex;align-items:center;justify-content:center;gap:10px;font-weight:800;font-size:19px;margin:6px 0}
#kidsGame .pc-badge-i{font-size:40px}
#kidsGame .pc-badge-s{font-size:26px;letter-spacing:3px}
#kidsGame .pc-picks,#kidsGame .pc-gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
#kidsGame .pc-pick,#kidsGame .pc-gcard{display:flex;flex-direction:column;align-items:center;gap:6px;border:3px solid var(--line);background:#fff;border-radius:22px;padding:18px 10px;box-shadow:0 5px 0 #e3edf9;font-size:19px}
#kidsGame .pc-pick span,#kidsGame .pc-gcard span{font-size:54px;line-height:1.1}
#kidsGame .pc-pick:hover,#kidsGame .pc-gcard:hover{border-color:#93c5fd}

/* hand, toast, confetti */
#kidsGame .pc-hand{position:absolute;top:100%;left:50%;font-size:34px;line-height:1;pointer-events:none;z-index:20;transform:translateX(-50%);animation:pcHand .9s ease-in-out infinite;filter:drop-shadow(0 2px 2px #0003)}
@keyframes pcHand{50%{transform:translate(-50%,-8px)}}
#kidsGame .pc-toast{position:fixed;left:50%;bottom:16px;transform:translate(-50%,140%);max-width:min(560px,calc(100vw - 32px));background:#fff;border:3px solid var(--blue2);border-radius:18px;padding:10px 16px;font-weight:700;font-size:17px;box-shadow:0 8px 24px #0002;z-index:50;transition:transform .3s,opacity .3s;pointer-events:none;opacity:0;visibility:hidden}
#kidsGame .pc-toast.on{transform:translate(-50%,0);opacity:1;visibility:visible}
#kidsGame .pc-confetti{position:fixed;inset:0;pointer-events:none;z-index:60;overflow:hidden}
#kidsGame .pc-confetti i{position:absolute;top:-12px;width:10px;height:14px;border-radius:3px;animation:pcFall 2.2s ease-in forwards}
@keyframes pcFall{to{transform:translateY(105vh) rotate(540deg)}}

/* phones */
@media (max-width:520px){
  #kidsGame .pc{padding:8px 8px 22px;font-size:17px;border-radius:16px}
  #kidsGame .pc-title{font-size:18px}
  #kidsGame .pc-say{font-size:17px}
  #kidsGame .pc-av{font-size:36px}
  #kidsGame .pc-map{grid-template-columns:1fr 1fr;gap:10px}
  #kidsGame .pc-bub{min-height:150px;padding:12px 4px 10px}
  #kidsGame .pc-bi{font-size:38px}
  #kidsGame .pc-bt{font-size:16px}
  #kidsGame .pc-tab{font-size:17px;min-height:52px}
  #kidsGame .pc-exs{font-size:14px;padding:5px 10px}
  #kidsGame .pc-it{font-size:32px;min-width:58px;min-height:58px}
  #kidsGame .pc-it.big{font-size:46px}
  #kidsGame .pc-it.cd{font-size:19px}
  #kidsGame .pc-stext{font-size:19px}
  #kidsGame .pc-code{font-size:15px}
  #kidsGame .pc-btn{padding:10px 18px;font-size:17px}
  #kidsGame .pc-snav .pc-btn{padding:10px 12px;font-size:16px}
  #kidsGame .pc-snav{flex-wrap:wrap}
  #kidsGame .pc-dots{order:-1;flex-basis:100%;margin-bottom:6px}
  #kidsGame .pc-picks,#kidsGame .pc-gal{grid-template-columns:1fr 1fr}
}
@media (prefers-reduced-motion:reduce){#kidsGame .pc *{animation:none!important;transition:none!important}}
