.k20{--purple:#6635b2;--ink:#40216d;--pale:#f3ebfc;color:var(--ink);font:18px/1.55 system-ui,sans-serif;max-width:1500px;margin:auto}.k20 *{box-sizing:border-box}.k20 h2{font-size:30px;margin:5px 0 20px}.k20 h3{font-size:25px;margin:0 0 8px}.k20 button{font:inherit;cursor:pointer;background:#f1e8fb;color:var(--ink);border:1px solid #dbc8ef;border-radius:12px;padding:10px 17px}.k20 button:disabled{opacity:.45;cursor:default}.k20 button:focus-visible,.k20 input:focus-visible{outline:3px solid #f5b54c;outline-offset:3px}.k20 .k20-primary,.k20-tabs .active{background:var(--purple);color:white;border-color:var(--purple);font-weight:700}.k20-eyebrow{font-size:14px;letter-spacing:2px;color:#8b65b9;font-weight:700}.k20-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px}.k20-tabs button{font-size:16px}.k20-tabs .passed:after{content:' ★';color:#d89b24}.k20-goal{background:white;border:1px solid #e5d6f6;border-radius:18px;padding:22px;margin-bottom:18px}.k20-goal p{margin:4px 0}.k20 details{font-size:15px;color:#82649c;margin-top:8px}.k20-layout{display:grid;grid-template-columns:minmax(340px,1fr) minmax(350px,1.25fr);gap:20px;align-items:start}.k20-editor{background:white;border:1px solid #e5d6f6;border-radius:18px;padding:18px;min-width:0}.k20-bank{display:flex;flex-wrap:wrap;gap:7px;padding:15px 0;max-height:245px;overflow:auto}.k20 .k20-block{border:0;border-radius:0;color:white;background:#8c57cf;min-height:47px;padding:10px 15px 13px;position:relative;clip-path:polygon(0 0,18px 0,24px 6px,42px 6px,48px 0,100% 0,100% calc(100% - 7px),48px calc(100% - 7px),42px 100%,24px 100%,18px calc(100% - 7px),0 calc(100% - 7px));box-shadow:inset 0 -8px #0002;display:flex;align-items:center;gap:7px;font-weight:600;font-size:16px}.k20 .cat-动作{background:#5476d8}.k20 .cat-事件{background:#d99327}.k20 .cat-控制{background:#ca8430}.k20 .cat-外观{background:#8c57cf}.k20-insert{font-size:14px;margin:2px 0}.k20 .k20-small{font-size:13px;padding:5px 10px;margin:3px 0}.k20-workspace{background:radial-gradient(#dbcbed 1px,transparent 1px) 0 0/16px 16px #fbf9ff;min-height:200px;max-height:580px;overflow:auto;border:2px solid #e4d4f3;border-radius:14px;margin:12px 0;padding:16px}.k20-hat{background:#d99327;border-radius:24px 24px 5px 5px;width:max-content;max-width:100%;font-weight:700;color:white;padding:10px 15px}.k20-stack{min-height:35px;padding-bottom:8px}.k20-node{margin-top:-2px}.k20-node>.k20-block{width:max-content;max-width:100%}.k20 .k20-block input{border:0;border-radius:15px;background:white;color:#40216d;padding:5px 7px;font:16px system-ui;width:58px;min-width:0}.k20 .k20-block input:not([type=number]){width:125px}.k20-blocktools{display:flex;gap:2px;margin-left:auto}.k20 .k20-blocktools button{font-size:15px;border:0;background:#fff2;color:white;padding:1px 6px;border-radius:5px}.k20-cavity{border-left:16px solid #ca8430;padding-left:8px;background:#faf6ff}.k20-cbottom{height:17px;background:#ca8430;border-radius:0 0 8px 8px}.k20-empty{font-size:14px;color:#937eaa;padding:10px;margin:0}.k20-node.executing>.k20-block{background:#edb73e;color:#37204f}.k20-node.has-error>.k20-block{background:#c94f65}.k20-controls{display:flex;gap:7px;flex-wrap:wrap}.k20-view{position:sticky;top:18px;min-width:0}.k20-scene{height:315px;position:relative;overflow:hidden;border:2px solid #dec9f4;border-radius:20px;background:linear-gradient(#efe7fc 0 68%,#d7c4ed 68% 70%,#eee1fa 70%);isolation:isolate}.k20-sky{position:absolute;top:20px;left:35%;width:26%;height:90px;border:8px solid #fff9;border-radius:15px;background:linear-gradient(135deg,#d3c3f4,#fbf4ff)}.k20-sky:before{content:'';height:100%;width:6px;display:block;background:#fff9;margin:auto}.k20-stations{position:absolute;inset:0}.k20-station{position:absolute;top:126px;transform:translateX(-50%);width:21%;text-align:center;font-size:13px}.k20-station-icon{font-size:32px;display:block;background:#d6b9ed;border-radius:8px 8px 2px 2px;border-bottom:8px solid #9976b8;line-height:42px}.k20-station b,.k20-station small{display:block}.k20-station small{font-size:12px;color:#816299}.k20-track{position:absolute;bottom:13px;left:7%;right:7%;border-bottom:2px dashed #b899d6;height:6px}.k20-sprite{position:absolute;left:8%;bottom:36px;width:82px;height:108px;transform:translateX(-50%);transition:left .8s ease;z-index:4}.k20-fox{width:100%;height:100%;background-image:url('/little-k-transparent.png');background-size:335.6% 146.40625%;background-position:5.09% 53.87%;transform-origin:bottom}.k20-sprite.walking .k20-fox{animation:k20walk .18s alternate infinite}.k20-held,.k20-world-cup{height:24px;width:20px;border:3px solid #9b74c0;border-top:0;background:#fff;border-radius:0 0 7px 7px;z-index:5}.k20-held{position:absolute;right:-3px;top:50px}.k20-held:after,.k20-world-cup:after{content:'';position:absolute;width:8px;height:12px;border:3px solid #9b74c0;right:-10px;top:3px;border-radius:0 8px 8px 0}.k20-held span,.k20-world-cup span{position:absolute;background:#fff3cd;inset:6px 0 0;opacity:0}.k20 .filled span{opacity:1}.k20-world-cup{position:absolute;bottom:111px;left:8%;transform:translateX(-50%);transition:left .8s}.k20-water{position:absolute;left:62%;top:157px;height:35px;width:9px;background:repeating-linear-gradient(#7bcbef 0 5px,#c3efff 6px 9px);z-index:3;display:none}.k20-water.flowing{display:block;animation:k20water .3s linear infinite}.k20-chest{position:absolute;bottom:100px;font-size:42px;transform:translateX(-50%)}.k20-bubble{font-size:22px;font-weight:700;background:white;border:1px solid #e6d7f5;border-radius:15px;padding:14px 18px;margin:10px 0}.k20-monitor{background:#38204f;border:6px solid #cbb4e2;border-radius:15px;padding:12px;color:#faf2ff}.k20-monitor>span{font-size:12px;color:#cab2e9}.k20-output{font:24px/1.4 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;min-height:45px;margin:8px 0}.k20-state{font-size:14px;color:#816299}.k20-feedback{padding:14px 18px;background:#f1e8fb;border-left:5px solid #a175cd;border-radius:10px;font-size:17px;min-height:60px}.k20-feedback.error{background:#fff0f1;border-color:#c94f65}.k20-feedback.success{background:#fff5dc;border-color:#e6a72e}.k20-code,.k20-target{white-space:pre-wrap;background:white;border:1px solid #e5d6f6;padding:15px;border-radius:10px;font-size:16px}.k20-footer{border-top:1px solid #e5d6f6;margin-top:24px;padding-top:20px}.k20-footer button{min-width:200px}.k20-vocab{background:white;border:1px solid #dfccef;border-radius:20px;padding:32px;max-width:750px;margin:auto}.k20-word{display:block;font-size:52px;letter-spacing:3px;margin:24px 0 5px}.k20-letters{font-size:25px;letter-spacing:3px}.k20-vocab button{margin:5px}.k20-vocab input{display:block;width:100%;max-width:480px;border:2px solid #b591db;border-radius:12px;padding:16px;font-size:27px;margin:14px 0}.k20 [hidden]{display:none!important}.k20-scene[data-action=pour] .k20-held:before{content:'🥛';position:absolute;top:-40px;left:-5px;transform:rotate(-45deg);animation:k20pour .4s alternate infinite}.k20-scene[data-action=wash] .k20-held{animation:k20wash .3s alternate infinite}.k20-scene[data-action=drink] .k20-held{transform:translate(-17px,-22px) rotate(-30deg)}.adventure .k20-station-icon{background:transparent;border:0;color:#bb95e6}.adventure .k20-station b{display:none}@keyframes k20walk{to{transform:rotate(4deg) translateY(-5px)}}@keyframes k20water{to{background-position-y:9px}}@keyframes k20wash{to{transform:rotate(15deg)}}@keyframes k20pour{to{transform:rotate(-60deg)}}@media(max-width:900px){.k20-layout{grid-template-columns:1fr}.k20-view{position:static;grid-row:1}.k20-scene{height:295px}.k20-workspace{max-height:420px}}@media(prefers-reduced-motion:reduce){.k20 *{animation:none!important;transition:none!important}}

.k20-station b{position:absolute;top:-25px;width:100%}.k20-station small{position:absolute;top:-43px;width:100%}.k20-sprite{width:92px;height:120px;bottom:24px}.k20-held{top:56px}

/* V20.1: outdoor trail, destination and clear audio controls */
.k21-audio{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 18px}.k21-audio button{font-size:15px;padding:8px 12px}.k21-audio small{font-size:12px;color:#8f76a8}.adventure{background:linear-gradient(#f3e3ff 0 42%,#e5cef7 42% 68%,#d9bcf0 68% 70%,#f1e6fc 70%)!important}.adventure .k20-sky{background:#c8a6e7;border:0;width:90%;height:180px;top:85px;left:-20%;border-radius:50% 80% 0 0;transform:rotate(-6deg);opacity:.4;z-index:-1}.adventure .k20-sky:before{width:90%;height:100%;position:absolute;left:70%;top:-20px;background:#b591d7;border-radius:70% 70% 0 0}.adventure .k20-station-icon{font-size:20px;color:#d6a345;line-height:30px;margin-top:28px}.adventure .k20-chest{bottom:25px;transform:translateX(8px);font-size:38px;z-index:3}.adventure .k20-chest.opened{width:55px;height:37px;background:linear-gradient(#f7cd62 0 16%,#9a531f 16% 28%,#c78a36 28% 70%,#f4c358 70%);border:3px solid #ad6724;border-radius:5px;color:#ffe580;text-align:center;line-height:20px}.adventure .k20-chest.opened:before{content:'';position:absolute;bottom:33px;left:-3px;width:49px;height:22px;background:#eac16c;border:3px solid #ad6724;border-radius:10px 10px 0 0;transform:rotate(-15deg);transform-origin:left bottom}.k20-scene.celebrate .k20-fox{animation:k21celebrate .4s ease alternate 4}.k20-scene.celebrate:after{content:'✦ ✧ ✦';position:absolute;right:10px;top:28px;letter-spacing:15px;color:#e2a72f;font-size:30px;animation:k21sparkle .5s alternate 4}.k20-cavity.choosing{background:#efe1ff;outline:2px solid #b58bd9}@keyframes k21celebrate{to{transform:translateY(-9px) rotate(5deg)}}@keyframes k21sparkle{to{opacity:.3;transform:translateY(8px)}}
.adventure.chest-open .k20-sprite{margin-left:-35px}.adventure .k20-chest.opened{transform:translateX(15px)}
/* Live block to C++ lesson */
.k22-language .k20-layout{grid-template-columns:minmax(350px,1fr) minmax(380px,1.12fr)}.k22-code-panel{border:2px solid #d7bfec;border-radius:18px;background:white;padding:18px;margin-bottom:16px}.k22-code-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.k22-code-head h3{font-size:23px;margin:0}.k22-caption{font-size:14px;color:#8c719f;margin:8px 0 14px}.k22-code-lines{border-radius:12px;background:#302040;padding:16px 4px;color:#f5ecff;overflow:auto;min-height:155px}.k22-code-line{display:flex;align-items:baseline;min-height:38px;padding:3px 12px;font:22px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre;border-left:4px solid transparent}.k22-line-no{width:30px;flex-shrink:0;color:#9c84b1;font-size:13px;user-select:none}.k22-code-line code{font:inherit}.k22-keyword{color:#d6b4ff;font-weight:bold}.k22-string{color:#f7cc79}.k22-symbol{color:#9cdbe0}.k22-comment{color:#b7a3c8;font-size:17px}.k22-code-line.executing{background:#715021;border-left-color:#ffc760}.k22-code-line.k22-linked{background:#634281;border-left-color:#c999ff}.k22-code-empty{font-size:17px;color:#c3a9d8;padding:10px}.k22-explanation{font-size:16px;margin:14px 0 0}.k20-node.k22-linked>.k20-block{outline:4px solid #ffcc6c;filter:brightness(1.15)}.k22-mini-lesson{font-size:17px;background:#f3e9ff;border-radius:12px;padding:13px}.k22-intro{border:1px solid #e0cdef;background:white;border-radius:22px;padding:28px}.k22-intro-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.k22-intro article{background:#f5effc;padding:18px;border-radius:15px}.k22-intro h4{margin:0 0 10px;font-size:21px}.k22-intro article p{margin:0;font-size:17px}.k22-example{display:flex;align-items:center;justify-content:center;gap:22px;padding:20px;background:#fbf7ff;border:1px dashed #c7a6e4;border-radius:14px;flex-wrap:wrap}.k22-example strong{padding:12px 20px;border-radius:8px;background:#8c57cf;color:white}.k22-example code{font:24px ui-monospace,monospace;color:#6635b2}.k22-route{font-size:16px;color:#8a6aa7}.k22-language .k20-view{top:10px}.k22-language .k20-target{font-size:21px}.k22-code-line:focus-visible{outline:3px solid #ffd18a;outline-offset:-3px}@media(max-width:900px){.k22-language .k20-layout{grid-template-columns:1fr}.k22-language .k20-view{grid-row:auto}.k22-intro-cards{grid-template-columns:1fr}.k22-code-line{font-size:19px}.k22-intro{padding:18px}}
.k21-pronounce{font-size:15px!important;padding:3px 8px!important;vertical-align:middle;margin:0 3px}.k22-code-lines{max-height:430px}.ks-guide{background:#f4edfc;padding:14px 18px;border-radius:14px;margin:14px 0}.ks-legend{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:15px 0}.ks-legend>div{display:flex;align-items:center;gap:12px;background:white;padding:12px;border-radius:10px}.ks-legend strong{font:26px ui-monospace,monospace;color:#6635b2;min-width:35px}.ks-legend span{font-size:14px}.ks-tip{font-size:15px;color:#8e709f}.ks-list{min-height:140px;max-height:500px;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px;padding:18px;background:radial-gradient(#d7c8e7 1px,transparent 1px) 0 0/15px 15px #fbf8ff;border:2px dashed #cdb3e5;border-radius:14px;margin:15px 0}.k20 .ks-token{font:23px ui-monospace,monospace;min-width:50px;justify-content:center}.k20 .ks-piece{font:19px ui-monospace,monospace;gap:6px;padding:10px 12px 15px;align-self:flex-start}.ks-piece strong{font:inherit}.ks-piece small{font:11px system-ui;opacity:.65}.k20 .ks-piece button{padding:1px 4px;background:#fff2;color:white;border:0;font-size:13px}.ks-code{background:#302040;color:#f5eafa;padding:20px;border-radius:15px;min-height:190px;max-height:450px;overflow:auto;font:22px/1.65 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.ks-error{background:#bf4d65!important}.k-symbols .k20-bank{max-height:none}.k-symbols .k20-view{position:sticky;top:12px}.k-symbols .k20-output{margin:0}.k-foundation5-entry{margin:8px 0;width:100%;text-align:left}.k-foundation5-entry:disabled{opacity:.5}@media(max-width:800px){.ks-legend{grid-template-columns:1fr}.ks-code{font-size:19px}.k-symbols .k20-view{position:static;grid-row:auto}}
