:root{--ink:#2a1d3d;--night:#2b1d3f;--night2:#3a2757;--curtain:#c0283f;--gold:#ffd23f;--cream:#fff8ec;--paper:#fff;--muted:#6d6380;--ok:#2fa84f;--bad:#d8434f;--c:#e6a800;--r:16px;--shadow:0 6px 22px #1e0f3238}*{box-sizing:border-box}html,body{margin:0}body{color:var(--ink);background:radial-gradient(1200px 600px at 50% -10%, #4b3270, var(--night) 60%) fixed, var(--night);min-height:100vh;font-family:Rubik,Segoe UI,Arial,sans-serif;overflow-x:hidden}button{cursor:pointer;font-family:inherit}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:.9rem}.tiny{font-size:.78rem}bdi{unicode-bidi:isolate}.btn{color:var(--ink);background:var(--gold);border:0;border-radius:999px;align-items:center;gap:.4rem;padding:.7rem 1.3rem;font-size:1.02rem;font-weight:700;text-decoration:none;transition:transform 80ms,box-shadow 80ms;display:inline-flex;box-shadow:0 4px #c99a00,0 6px 14px #0000002e}.btn:active{transform:translateY(3px);box-shadow:0 1px #c99a00}.btn.big{padding:.85rem 1.8rem;font-size:1.25rem}.btn.ghost{background:#fff;box-shadow:0 4px #d6cde6,0 6px 14px #0000001f}.btn.run{color:#fff;background:#59c059;font-size:1.1rem;box-shadow:0 4px #389438,0 6px 14px #0000002e}.btn:disabled{opacity:.55;cursor:default;transform:none}.small-btn{padding:.5rem 1rem;font-size:.92rem}.link-btn{color:#6a3fd1;text-underline-offset:3px;background:0 0;border:0;padding:.3rem;font-size:.95rem;font-weight:700;text-decoration:underline}.icon-btn{color:#fff;background:#ffffff29;border:0;border-radius:12px;flex:none;width:42px;height:42px;font-size:1.25rem}.icon-btn:hover{background:#ffffff47}.row{flex-wrap:wrap;justify-content:center;align-items:center;gap:.8rem;display:flex}#home{grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);align-items:center;gap:1.5rem;max-width:1150px;margin:0 auto;padding:1.5rem 1rem 1rem;display:grid}.hero{text-align:center;color:#fff}.hero-stage{max-width:560px;height:230px;box-shadow:inset 0 -10px 0 #7a4a22, var(--shadow);background:linear-gradient(#3a2757 0 72%,#b9773f 72%);border-radius:22px;margin:0 auto .6rem;position:relative;overflow:hidden}.curtain{z-index:3;background:repeating-linear-gradient(90deg,#c0283f 0 22px,#a51f35 22px 34px);width:26%;animation:1.6s ease-out both open;position:absolute;top:0;bottom:0}.c-r{transform-origin:100%;border-bottom-left-radius:60% 20%;right:0}.c-l{transform-origin:0;border-bottom-right-radius:60% 20%;left:0}@keyframes open{0%{width:52%}}.beam{clip-path:polygon(40% 0,60% 0,100% 100%,0 100%);background:radial-gradient(at top,#fff4b073,#0000 70%);width:260px;height:100%;position:absolute;top:0;left:50%;transform:translate(-50%)}.hero-cast{z-index:2;justify-content:space-evenly;display:flex;position:absolute;bottom:30px;left:24%;right:24%}.hero-cast img{aspect-ratio:1;object-fit:contain;width:22%;max-width:64px;height:auto;animation:2.6s ease-in-out infinite bow;animation-delay:var(--d)}@keyframes bow{0%,70%,to{transform:translateY(0)}80%{transform:translateY(-14px)}}.hero-mascot{z-index:2;filter:drop-shadow(0 4px 10px #ffe67880);position:absolute;top:8px;left:50%;transform:translate(-50%)}.logo-word{letter-spacing:-1px;text-shadow:0 4px #00000040;margin:.2rem 0;font-size:clamp(2.6rem,8vw,4.4rem);font-weight:900}.lw-a{color:#fff}.lw-b{color:var(--gold)}.tagline{max-width:34rem;margin:0 auto .8rem;font-size:1.15rem;line-height:1.55}.hero-chips{flex-wrap:wrap;justify-content:center;gap:.45rem;margin-bottom:1.1rem;display:flex}.hero-chips span{background:#ffffff1f;border:1px solid #fff3;border-radius:999px;padding:.3rem .7rem;font-size:.92rem}.hero .muted{color:#cfc3e6;margin-top:.9rem}.home-side{background:var(--cream);border-radius:var(--r);box-shadow:var(--shadow);padding:1.1rem 1.3rem}.home-side h3{margin:.2rem 0 .6rem}.how{margin:0;padding-inline-start:1.2rem;line-height:1.6}.how li{margin-bottom:.45rem}.bar{color:#fff;background:linear-gradient(90deg, color-mix(in srgb, var(--c) 82%, #000), color-mix(in srgb, var(--c) 55%, #2b1d3f));z-index:20;align-items:center;gap:.6rem;padding:.55rem .8rem;display:flex;position:sticky;top:0}#map .bar{background:linear-gradient(90deg,#c0283f,#6e1d4a)}.bar h2{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;margin:0;font-size:1.15rem;overflow:hidden}.stars-total{white-space:nowrap;background:#0003;border-radius:999px;padding:.3rem .7rem;font-weight:700}.best{opacity:.92;white-space:nowrap;font-size:.82rem}.sb3-btn{white-space:nowrap;padding:.45rem .9rem;font-size:.92rem;box-shadow:0 3px #c99a00}.lt-n{opacity:.75}.rank-strip{background:var(--cream);border-radius:var(--r);width:calc(100% - 1.6rem);max-width:1100px;box-shadow:var(--shadow);align-items:center;gap:.8rem;margin:.9rem auto 0;padding:.6rem 1rem;display:flex}.r-icon{font-size:2rem}.r-body{flex:1}.r-top{flex-wrap:wrap;justify-content:space-between;gap:.5rem;font-size:.95rem;display:flex}.r-bar{background:#eadff5;border-radius:99px;height:10px;margin-top:.35rem;overflow:hidden}.r-bar i{background:linear-gradient(90deg, var(--gold), #ff9f1c);border-radius:99px;height:100%;display:block}.t-tag{color:#fff;white-space:nowrap;background:#2b1d3f;border-radius:99px;padding:.25rem .6rem;font-size:.82rem}.stations{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:1rem;max-width:1100px;margin:0 auto;padding:1rem .8rem 2rem;display:grid}.station{background:var(--paper);border-radius:var(--r);box-shadow:var(--shadow);border-top:8px solid var(--c);padding:.9rem}.st-head{align-items:center;gap:.7rem;margin-bottom:.7rem;display:flex}.st-head h3{margin:0;font-size:1.2rem}.st-head small{color:var(--muted)}.st-icon{background:color-mix(in srgb, var(--c) 18%, #fff);border-radius:14px;place-items:center;width:52px;height:52px;font-size:2rem;display:grid}.st-stars{color:var(--muted);margin-inline-start:auto;font-weight:700}.tickets{grid-template-columns:repeat(5,1fr);gap:.45rem;display:grid}.ticket{aspect-ratio:1/1.1;border:2px dashed color-mix(in srgb, var(--c) 55%, #fff);background:color-mix(in srgb, var(--c) 10%, #fff);color:var(--ink);border-radius:12px;flex-direction:column;justify-content:center;align-items:center;padding:.2rem;display:flex;position:relative}.ticket:hover:not(.locked){background:color-mix(in srgb, var(--c) 22%, #fff);transform:translateY(-2px)}.t-ico{font-size:1.3rem}.t-num{font-size:1.05rem;font-weight:900}.ticket small{color:#e0a400;letter-spacing:-1px;font-size:.8rem}.ticket.locked{opacity:.5;cursor:default}.ticket.current{border-style:solid;border-color:var(--c);box-shadow:0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent);animation:1.6s infinite pulse}.ticket.perfect{background:#fff7d1}.ticket .kind{font-size:.95rem;font-style:normal;position:absolute;top:-8px;left:-6px}@keyframes pulse{50%{box-shadow:0 0 0 7px color-mix(in srgb, var(--c) 15%, transparent)}}.sheet-btn{margin-top:.5rem}#play{height:100vh;flex-direction:column;height:100dvh;display:flex}.work{flex:1;min-height:0;display:flex}.ws-col{background:#f9f7fc;flex:1;min-width:0;position:relative}.blockly{position:absolute;inset:0}.side{background:#efe9f7;flex-direction:column;flex:none;gap:.6rem;width:min(500px,42vw);padding:.7rem;display:flex;overflow-y:auto}#play.big-stage .side{width:min(820px,62vw)}.goal{background:#fff;border-radius:12px;padding:.65rem .8rem;font-size:1rem;line-height:1.55;box-shadow:0 2px 8px #28144614}.kind-tag{background:#fff3c4;border-radius:99px;margin-inline-end:.3rem;padding:.12rem .55rem;font-size:.8rem;font-weight:700;display:inline-block}.kind-tag.k-bug{background:#ffe0e3}.kind-tag.k-band{background:#e6dcff}.hint-box{background:#fffbe8;border:2px solid #ffd23f;border-radius:12px;padding:.55rem .8rem;line-height:1.5}.hint-box p{opacity:.75;margin:.3rem 0}.hint-box p.new{opacity:1;font-weight:500}.hint-box .row{justify-content:flex-start}.stage-wrap{background:#2b1d3f;border-radius:14px;position:relative;overflow:hidden;box-shadow:0 4px 16px #1e0f3240}.stage-wrap canvas{aspect-ratio:4/3;touch-action:manipulation;width:100%;display:block}.stage-wrap.scene{box-shadow:0 0 0 4px var(--gold), 0 4px 16px #1e0f3240}.stage-wrap.running{box-shadow:0 0 0 4px #59c059,0 4px 16px #1e0f3240}.stage-tools{gap:6px;display:flex;position:absolute;bottom:8px;left:8px}.mini{opacity:.85;background:#ffffffc7;border:0;border-radius:10px;width:34px;height:34px;font-size:1rem}.mini.on{background:var(--gold);opacity:1}.timeline{direction:ltr;align-items:center;gap:.5rem;padding:0 .2rem;display:flex;position:relative}.timeline input{accent-color:#96f;flex:1}.timeline .mark{background:var(--bad);pointer-events:none;border-radius:2px;width:4px;height:22px;margin-left:6px;position:absolute;top:-2px}.clock{font-variant-numeric:tabular-nums;color:var(--muted);text-align:center;min-width:2.4rem;font-weight:700}.controls{flex-wrap:wrap;justify-content:center;gap:.6rem;display:flex}.controls .run{flex:1;justify-content:center;max-width:280px}.result{border-radius:12px;padding:.6rem .8rem;line-height:1.5}.result p{margin:.3rem 0}.result small{color:var(--muted)}.result.bad{background:#fff0f1;border:2px solid #f3b8be}.result.good{background:#ecfbef;border:2px solid #9bdcaa;font-size:1.05rem}.cast{background:#fff;border-radius:12px;padding:.5rem .6rem}.cast-head{margin-bottom:.4rem;font-weight:700}.cast-head small{color:var(--muted);font-weight:500}.cast-list{flex-wrap:wrap;gap:.5rem;display:flex}.actor{min-width:76px;color:var(--ink);background:#faf8fd;border:2px solid #e2daf0;border-radius:12px;flex-direction:column;align-items:center;padding:.3rem .5rem;font-size:.88rem;font-weight:700;display:flex;position:relative}.actor img{object-fit:contain;width:46px;height:46px}.actor.on{background:#e9f1ff;border-color:#4c97ff;box-shadow:0 0 0 3px #4c97ff40}.actor em{font-size:.9rem;font-style:normal;position:absolute;top:-8px;right:-4px}.actor i{color:#fff;background:#4c97ff;border-radius:99px;place-items:center;min-width:20px;height:20px;font-size:.75rem;font-style:normal;display:grid;position:absolute;top:-7px;left:-4px}.toast{box-shadow:var(--shadow);cursor:pointer;background:#fffffff7;border-radius:12px;padding:.55rem .8rem;font-size:.95rem;line-height:1.45;position:absolute;top:8px;left:8px;right:8px}.toast.bad{border-inline-start:6px solid var(--bad)}#hintBtn.nudge{background:var(--gold);animation:1s infinite nudge}@keyframes nudge{50%{transform:scale(1.15)rotate(-8deg)}}.ws-tools{z-index:5;gap:6px;display:flex;position:absolute;top:8px;left:8px}.ws-tools button{background:#fff;border:1px solid #ddd3ea;border-radius:10px;width:38px;height:38px;font-size:1.15rem;box-shadow:0 2px 6px #00000014}.ws-tools button:disabled{opacity:.4}.del-block{z-index:6;background:var(--bad);border:2px solid #fff;border-radius:50%;width:34px;height:34px;font-size:1rem;position:absolute;box-shadow:0 2px 8px #00000040}.modal{z-index:100;background:#190c2d9e;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.card{background:var(--cream);text-align:center;border-radius:22px;width:100%;max-width:460px;max-height:92vh;padding:1.3rem 1.4rem;overflow-y:auto;box-shadow:0 20px 50px #00000059}.card.wide{text-align:start;max-width:620px}.card h2{margin:.3rem 0 .6rem}.card p{line-height:1.6}.intro-mascot{justify-content:center;display:flex}.win-stars{letter-spacing:.2rem;font-size:3rem}.win-stars span{animation:.5s backwards pop;animation-delay:calc(var(--i) * .18s);display:inline-block}.win-stars .off{filter:grayscale();opacity:.3}@keyframes pop{0%{transform:scale(0)rotate(-40deg)}70%{transform:scale(1.3)}}.why{text-align:start;background:#fff;border-radius:12px;margin:.6rem 0;padding:.5rem .8rem}.why summary{cursor:pointer;font-weight:700}.steps{line-height:1.8}.switch{cursor:pointer;background:#fff;border-radius:12px;align-items:flex-start;gap:.6rem;padding:.7rem;font-weight:700;display:flex}.switch input{accent-color:#96f;flex:none;width:22px;height:22px}.teach-list{padding-inline-start:1.2rem;line-height:1.6}.sheets{flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;display:flex}.confetti{pointer-events:none;z-index:200;width:100%;height:100%;position:fixed;inset:0}#games-footer{color:#d8cdea;text-align:center;padding:1.2rem 1rem 2rem;font-size:.88rem;overflow-x:clip}#games-footer a{color:var(--gold)}#games-footer .about{max-width:760px;margin:.35rem auto;line-height:1.5}#games-footer .unofficial{opacity:.85;font-size:.82rem}.blocklyToolboxDiv,.blocklyFlyout{font-family:Rubik,Arial,sans-serif}@media (max-width:900px){#home{grid-template-columns:1fr;padding-top:1rem}#play{height:auto;min-height:100dvh}.work{flex-direction:column}.side{order:-1;overflow:visible;width:100%!important}.ws-col{flex:none;height:72vh;min-height:440px}.best,.sb3-btn span{display:none}.stations{grid-template-columns:1fr}#play.big-stage .side{width:100%}}@media (max-width:420px){.bar{gap:.35rem;padding:.45rem .5rem}.icon-btn{width:36px;height:36px;font-size:1.05rem}.bar h2{font-size:1rem}.hero-stage{height:190px}.hero-cast img{width:48px;height:48px}.tickets{gap:.3rem}.btn.big{font-size:1.1rem}}.print-area{display:none}@media print{@page{size:A4;margin:12mm}body.printing{background:#fff}body.printing #app,body.printing #games-footer,body.printing .modal,body.printing #bdnplay-badge,body.printing .bdn-foot-logos{display:none!important}body.printing .print-area{color:#000;display:block}}.sheet{page-break-after:always;font-size:11pt}.sheet header{border-bottom:3px solid #c0283f;align-items:center;gap:12px;margin-bottom:8px;padding-bottom:6px;display:flex}.sheet header h1{margin:0;font-size:16pt}.sheet header p{margin:2px 0;font-size:9.5pt}.sh-logo{color:#c0283f;white-space:nowrap;font-size:18pt;font-weight:900}.sh-name{white-space:nowrap;margin-inline-start:auto;line-height:2}.sh-level{page-break-inside:avoid;border:1.5px solid #bbb;border-radius:10px;margin-bottom:8px;padding:6px 10px}.sh-level h2{margin:2px 0 4px;font-size:12.5pt}.sh-level h2 span{color:#fff;background:#2b1d3f;border-radius:6px;padding:0 6px}.sh-level h2 small{font-size:9pt;font-weight:500}.sh-goal{margin:2px 0 6px}.strip{gap:6px;display:flex}.strip figure{text-align:center;flex:1;margin:0;font-size:8pt}.strip img{border:1px solid #999;border-radius:6px;width:100%}.sh-row{align-items:flex-start;gap:10px;margin-top:4px;display:flex}.chips{flex-wrap:wrap;gap:4px;margin-top:3px;display:flex}.chip{border:2px solid var(--c);border-radius:6px;padding:0 5px;font-size:8.5pt}.sh-best{white-space:nowrap;margin-inline-start:auto;font-size:9pt}.sh-box{border:1.5px dashed #999;border-radius:8px;height:26mm;margin-top:6px;padding:4px 8px;font-size:9pt}.sh-q{margin:6px 0 2px;font-size:9.5pt}.sheet footer{color:#555;text-align:center;font-size:8pt}.sh-answer{page-break-inside:avoid;border-bottom:1px solid #ccc;padding:4px 0}.sh-answer h2{margin:4px 0;font-size:12pt}.ans-sprite{margin:2px 0 4px}.ans-sprite pre{white-space:pre-wrap;direction:rtl;background:#f4f1f9;border-radius:6px;margin:2px 0;padding:4px 8px;font-family:Rubik,Arial,sans-serif;font-size:9.5pt}.sh-answer .why{background:0 0;margin:2px 0;padding:0;font-size:9pt}
