/* Dunia Logika extends the shared ecosystem, rather than replacing its shells. */
body.dl-body{--ds-primary:#0f756d;--ds-ink:#203952;--ds-muted:#50647c;--ds-line:#dcebe9;--accent:#0f756d;--accent-soft:#e7f7f1;--accent-dark:#09695f}
body.dl-body.ds-child-shell{background:linear-gradient(140deg,#087a8ade,#3e529bc7),url('../images/logika-hero.webp') center top/cover fixed no-repeat}
body.dl-body.ds-child-shell .ds-header{background:linear-gradient(100deg,#087b8aef,#5454b5ee)}
body.dl-body.ds-child-shell .ds-welcome{background:linear-gradient(90deg,#075c70ed,#135c80b0 60%,#458e9b20),url('../images/logika-hero.webp') center right/cover no-repeat;min-height:155px}
body.dl-body.ds-child-shell .ds-main>p{color:#50647c}
body.dl-body .ds-brand .appearance-icon{background:#ffffff20}
.dl-world-art{display:block;width:100%;aspect-ratio:1.65;border-radius:13px;background-image:url('../images/logika-worlds.webp');background-size:400% 200%;background-repeat:no-repeat;font-size:0;flex:none}
.dl-world-pola .dl-world-art,.dl-world-art.dl-world-pola{background-position:0 0}
.dl-world-urutan .dl-world-art,.dl-world-art.dl-world-urutan{background-position:33.333% 0}
.dl-world-ingatan .dl-world-art,.dl-world-art.dl-world-ingatan{background-position:66.667% 0}
.dl-world-labirin .dl-world-art,.dl-world-art.dl-world-labirin{background-position:100% 0}
.dl-world-bentuk .dl-world-art,.dl-world-art.dl-world-bentuk{background-position:0 100%}
.dl-world-detektif .dl-world-art,.dl-world-art.dl-world-detektif{background-position:33.333% 100%}
.dl-world-galaksi .dl-world-art,.dl-world-art.dl-world-galaksi{background-position:66.667% 100%}
body.dl-body .dl-worlds .ds-world{padding:10px;gap:5px;min-width:0}
body.dl-body .dl-worlds h2{font-size:1rem;margin:8px 3px 2px}
body.dl-body .dl-worlds small{font-size:.65rem;color:#6c819b;margin:3px}
body.dl-body .dl-worlds progress{width:100%;height:6px;accent-color:#49ac9a;border:0;border-radius:10px}
body.dl-body .ds-home-shortcuts a{font-size:.86rem;font-weight:700}
body.dl-body .ds-levels{grid-template-columns:repeat(10,minmax(0,1fr))}
body.dl-body .ds-level{min-height:80px}
body.dl-body .ds-level strong{font-size:1.2rem}
body.dl-body .ds-level small{font-size:.7rem}
body.dl-body .ds-world-heading{background:#fff;color:#263f56}
body.dl-body .ds-world-heading h1{font-size:clamp(1.4rem,3vw,2rem)}
.dl-game[hidden]{display:none}.dl-game{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;background:radial-gradient(ellipse at top,#e4f4ed,transparent 65%),#f7fafc;color:#233c52;overflow:auto}
body.dl-playing{overflow:hidden}.dl-game-header{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:2;flex:none;padding:12px 20px;background:#ffffffed;border-bottom:1px solid #dceae9;backdrop-filter:blur(12px)}
.dl-game-header>div{margin-right:auto;min-width:0}.dl-game-header strong,.dl-game-header small{display:block}.dl-game-header small{font-size:.72rem;color:#50647c}.dl-game-header .ds-btn{min-height:38px;font-size:.72rem;padding:8px 12px;margin:0}.dl-game-content{width:min(850px,100%);margin:auto;padding:20px 24px 30px;min-width:0;text-align:center}
.dl-game-content>h2{font-size:clamp(1.2rem,3vw,1.8rem);letter-spacing:-.03em;margin:6px 0 10px}.dl-game-content>p{font-size:.87rem;line-height:1.65;max-width:70ch;margin:0 auto 18px;color:#50647c}
.dl-game-actions,.dl-result-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:16px}.dl-game-actions .ds-btn,.dl-result-actions .ds-btn{min-height:42px;padding:10px 16px;font-size:.8rem;margin:0}
.dl-puzzle{min-width:0}.dl-choice-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:20px 0}.dl-choice{display:grid;place-items:center;min-width:64px;min-height:64px;padding:12px;border:2px solid #d9e6ed;border-radius:16px;background:#fff;font-size:1.7rem;cursor:pointer;color:#24465d;box-shadow:0 4px 10px #24465d06}.dl-choice[aria-pressed=true]{background:#e4f6ee;border-color:#269e8b;box-shadow:0 0 0 3px #bde7dc}.dl-choice:disabled{opacity:.5;cursor:default}
.dl-sequence,.dl-answer-sequence{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:18px;border-radius:16px;background:#fff;border:1px solid #deebe9;margin:10px 0}.dl-sequence-item{font-size:1.9rem;min-width:35px}.dl-sequence-item.is-small{font-size:1.3rem}.dl-sequence-item.is-big{font-size:2.1rem}.dl-answer-sequence{font-size:1.3rem;font-weight:700;min-height:62px;line-height:1.7}.dl-memory-display{font-size:clamp(2rem,12vw,5rem);min-height:110px;display:grid;place-items:center;line-height:1.3;font-weight:750;color:#297b83;margin:14px auto}
.dl-puzzle-status{font-size:.75rem;color:#50647c;min-height:1.5em;margin:14px 0}.dl-feedback{padding:15px 18px;border:1px solid #bedecf;border-radius:13px;background:#edf9f1;font-size:.84rem;line-height:1.7;text-align:left;margin-top:16px;color:#2c685d}.dl-memory-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:500px;margin:18px auto}.dl-memory-card{font-size:2rem;aspect-ratio:1.2;border:2px solid #d3e6e0;border-radius:15px;background:#fff;color:#277c78;cursor:pointer}.dl-memory-card:disabled{opacity:1;background:#e5f5eb;border-color:#93cdb5}
.dl-maze{display:grid;grid-template-columns:repeat(var(--size),minmax(0,1fr));max-width:430px;margin:18px auto;border:5px solid #cadfdb;border-radius:15px;overflow:hidden;aspect-ratio:1;background:#d0e6de}.dl-maze button{width:100%;aspect-ratio:1;min-width:0;padding:0;border:1px solid #d5e5e1;box-shadow:none;font-size:clamp(.65rem,3.2vw,1.45rem);cursor:pointer}.dl-maze-wall{background:#467b73!important;opacity:1!important}.dl-maze-cell{background:#fff}.dl-maze-cell.visited{background:#d4efdd}.dl-maze-controls,.dl-piece-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.dl-maze-controls .ds-btn,.dl-piece-controls .ds-btn{margin:0;min-height:40px;font-size:.75rem;padding:9px 12px}
.dl-clues{text-align:left;padding:16px 18px 16px 36px;background:#edf6f3;border:1px solid #d7e9e3;border-radius:13px;font-size:.88rem;line-height:1.9}.dl-detective-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:450px;margin:12px auto;font-size:1.05rem}.dl-detective-choice select{font:inherit;padding:9px 12px;border:1px solid #c9dfda;border-radius:10px;background:#fff;max-width:50%}
.dl-piece-picker{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;margin:16px 0}.dl-piece{display:flex;align-items:center;gap:7px;padding:8px 12px;border:2px solid #d9e7e5;border-radius:12px;background:#fff;cursor:pointer;color:#25695f}.dl-piece[aria-pressed=true]{border-color:#289b88;background:#eaf8ef}.dl-piece-mini{display:grid;grid-template-columns:repeat(3,10px);grid-template-rows:repeat(3,10px);gap:2px}.dl-piece-mini i{display:block;background:#69b7a6;border:1px solid #4b9d8c;border-radius:2px}.dl-shape-board{display:grid;grid-template-columns:repeat(var(--width),minmax(0,1fr));max-width:540px;margin:18px auto;border:4px solid #c7ded7;border-radius:14px;overflow:hidden;background:#eff8f4}.dl-shape-cell{aspect-ratio:1;min-width:0;padding:0;font-size:1.2rem;border:1px solid #d5e7de;background:#fff;color:#335f58;cursor:pointer}.dl-shape-cell[style]{background:hsl(calc(var(--piece)*47 + 140) 62% 83%);font-weight:750}
.dl-lesson>summary{font-size:1rem;font-weight:750;cursor:pointer}.dl-lesson>p{font-size:.9rem;line-height:1.8}.dl-learning-puzzle .ds-btn,.dl-lesson .ds-btn{font-size:.74rem;min-height:38px;padding:9px 12px;margin:5px}.dl-learning-feedback{font-size:.8rem;line-height:1.7;color:#3c7b71;margin:14px 0}.dl-page-status{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:120;max-width:90vw;padding:13px 20px;border:1px solid #c7e4dc;border-radius:12px;background:#fff;color:#346e68;box-shadow:0 8px 25px #20395220;font-size:.85rem}
/* Public landing and a single live demo. */
body.dl-landing{background:#fcfefd;--ds-primary:#0f756d;color:#203952}.dl-landing-hero{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:36px;padding-block:25px}.dl-hero-art{width:100%;height:auto;aspect-ratio:3/2;border-radius:24px;display:block;object-fit:cover}.dl-landing h1{font-size:clamp(2rem,3.7vw,3.3rem);line-height:1.14;letter-spacing:-.045em}.dl-landing .dsl-hero{background:linear-gradient(120deg,#f0faf5,#f3efff)}.dl-demo{padding:19px;border:1px solid #dcece5;border-radius:20px;background:#fff;margin-top:15px;scroll-margin-top:100px}.dl-demo .dl-sequence-item{font-size:1.3rem;min-width:24px}.dl-demo .dl-sequence{padding:10px;gap:3px}.dl-demo .dl-choice{min-width:42px;min-height:42px;font-size:1.3rem;padding:8px}.dl-demo p{font-size:.76rem;line-height:1.6}.dl-demo .dsl-btn{font-size:.73rem;padding:9px 12px;min-height:38px}.dl-parent-copy,.dl-compare{display:grid;grid-template-columns:1.3fr 1fr;gap:25px;align-items:start}.dl-prices{grid-template-columns:repeat(3,minmax(0,1fr))}.dl-public-worlds{grid-template-columns:repeat(4,minmax(0,1fr))}.dl-landing .dsl-card{min-width:0}.dl-landing .dsl-sticky{gap:16px}.dl-landing .dsl-sticky small{display:block;font-size:.65rem}.dl-landing .dsl-sticky strong{font-size:1.05rem}.dl-landing .dsl-sticky del{font-size:.7rem;color:#778ca1}.dl-landing .dsl-header .appearance-icon{width:36px;height:36px}.dl-public-backdrop{position:fixed;inset:0;background:#173c5266;border:0;z-index:70}#dl-public-close{display:none}.dl-landing .dsl-footer>.dsl-wrap{display:flex;flex-wrap:wrap;gap:16px}
@media(max-width:1100px){.dl-landing #dl-public-close{display:block}.dl-landing .dsl-header nav{z-index:80}}
@media(max-width:850px){.dl-landing-hero,.dl-parent-copy,.dl-compare{grid-template-columns:1fr}.dl-public-worlds{grid-template-columns:repeat(2,minmax(0,1fr))}.dl-prices{grid-template-columns:1fr}.dl-game-content{padding:16px}}
@media(max-width:600px){body.dl-body .ds-levels{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}body.dl-body .ds-level{min-height:67px;padding:8px 4px;border-radius:11px}body.dl-body .ds-level strong{font-size:1rem}body.dl-body .ds-level small{font-size:.58rem}body.dl-body .dl-worlds .ds-world{padding:8px}.dl-world-art{aspect-ratio:1.5}.dl-worlds .ds-world>p{display:none}.dl-game-header{padding:10px 12px;gap:7px;flex-wrap:wrap}.dl-game-header>div{flex:1 1 50%}.dl-game-header strong{font-size:.85rem}.dl-game-header .ds-btn{font-size:.64rem;padding:7px 10px;min-height:34px}.dl-game-content{padding:14px 12px}.dl-game-content>p{font-size:.77rem}.dl-choice{min-width:51px;min-height:51px;font-size:1.4rem}.dl-sequence{padding:12px 8px;gap:5px}.dl-sequence-item{font-size:1.6rem;min-width:27px}.dl-sequence-item.is-big{font-size:1.8rem}.dl-sequence-item.is-small{font-size:1.15rem}.dl-memory-cards{gap:8px}.dl-memory-card{font-size:1.6rem}.dl-maze{max-width:340px}.dl-game-actions .ds-btn,.dl-result-actions .ds-btn{font-size:.73rem;padding:9px 12px}.dl-landing .dsl-sticky .dsl-btn{font-size:.7rem;padding:10px 12px;min-height:40px}.dl-landing .dsl-sticky{padding-inline:13px}.dl-landing h1{font-size:2rem}.dl-demo{padding:15px}.dl-demo .dl-sequence-item{font-size:1.05rem;min-width:20px}.dl-public-worlds{gap:12px}}
@media(max-height:500px) and (min-width:600px){.dl-game-content{margin:0 auto;padding-top:10px}.dl-maze{max-width:245px}.dl-memory-display{min-height:70px;font-size:3rem}.dl-game-header{padding-block:7px}}
@media(prefers-reduced-motion:reduce){body.dl-body.ds-child-shell{background-attachment:scroll}}
body.dl-body{--ds-primary:var(--accent,#0f756d)}body.dl-body[data-accent=blue]{--accent:#2859cc;--accent-dark:#2351b9;--accent-soft:#edf2ff}body.dl-body[data-accent=purple]{--accent:#7750c8;--accent-dark:#59369c;--accent-soft:#f2edfc}body.dl-body[data-accent=amber]{--accent:#975c0d;--accent-dark:#89530a;--accent-soft:#fff5df}body.dl-body[data-accent=green]{--accent:#0f756d;--accent-dark:#09695f;--accent-soft:#e7f7f1}
body.dl-body .dl-worlds progress{appearance:none;background:#e9f0f1;overflow:hidden}body.dl-body .dl-worlds progress::-webkit-progress-bar{background:#e9f0f1;border-radius:10px}body.dl-body .dl-worlds progress::-webkit-progress-value{background:var(--accent);border-radius:10px}body.dl-body .dl-worlds progress::-moz-progress-bar{background:var(--accent);border-radius:10px}.dl-landing .dsl-btn:not(.secondary){background:var(--accent);box-shadow:0 5px 15px #0f756d20}.dl-landing .dsl-sticky .dsl-btn{background:var(--accent)}
@media(max-width:600px){body.dl-body .dl-worlds .dl-world-galaksi{grid-column:1/-1;display:grid;grid-template-columns:95px minmax(0,1fr);gap:7px 12px}body.dl-body .dl-worlds .dl-world-galaksi .dl-world-art{grid-row:1/4;aspect-ratio:1;background-size:400% 200%}body.dl-body .dl-worlds .dl-world-galaksi h2,body.dl-body .dl-worlds .dl-world-galaksi small,body.dl-body .dl-worlds .dl-world-galaksi progress{grid-column:2}body.dl-body .dl-worlds .dl-world-galaksi .ds-card-bottom{grid-column:1/-1}}
.dl-sequence-item small,.dl-sized-choice small{display:block;font-size:.62rem;font-weight:600;color:#648391;line-height:1.4}.dl-sized-choice{display:flex;flex-direction:column;gap:4px}.dl-position-grid{display:grid;grid-template-columns:repeat(3,60px);justify-content:center;gap:9px}.dl-position-grid .dl-choice[aria-pressed=true]{background:#ffe39c;border-color:#dcaa43;box-shadow:0 0 0 3px #fff0c7}
.dl-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:25px}.dl-preview-grid figure{margin:0;padding:10px;border:1px solid #dcebe6;border-radius:18px;background:#fff;min-width:0}.dl-preview-grid img{display:block;width:100%;height:auto;border-radius:12px}.dl-preview-grid figcaption{font-size:.68rem;line-height:1.6;color:#758b9d;margin:9px 4px 2px}@media(max-width:700px){.dl-preview-grid{grid-template-columns:1fr}}
.dl-route-map{display:grid;grid-template-columns:repeat(var(--size),1fr);max-width:180px;margin:12px auto;border:3px solid #bfd8d1;border-radius:12px;overflow:hidden}.dl-route-map span{display:grid;place-items:center;aspect-ratio:1;background:#fff;border:1px solid #d3e5df;font-size:1.2rem}.dl-route-map .is-wall{background:#467b73}.dl-command-choice{font-size:.85rem;min-height:45px}
.dl-parent-privacy{font-size:.7rem;line-height:1.7;color:#50647c;margin:6px 0 15px}
/* A bounded game stage: answer controls never sit below a scrollable board. */
.dl-game{height:100vh;height:100dvh;overflow:hidden;padding-bottom:env(safe-area-inset-bottom);box-sizing:border-box}
.dl-game-stage{position:relative;flex:1;min-height:0;min-width:0;overflow:hidden}
.dl-game-stage .dl-game-content{position:absolute;left:50%;top:50%;width:min(850px,100%);box-sizing:border-box;margin:0;padding:10px 14px;transform:translate(-50%,-50%) scale(var(--dl-fit,1));transform-origin:center}
.dl-game-content>h2{margin:3px 0 6px;font-size:clamp(1rem,2.7vw,1.5rem)}
.dl-game-content>p{margin-bottom:8px;line-height:1.4;font-size:.8rem}
.dl-game .dl-sequence,.dl-game .dl-answer-sequence{padding:8px;min-height:0;margin:7px 0}
.dl-game .dl-choice-grid{gap:7px;margin:8px 0}
.dl-game .dl-choice{min-height:44px;min-width:44px;padding:7px;font-size:1.4rem}
.dl-game .dl-puzzle-status{margin:5px 0;font-size:.72rem}
.dl-game .dl-memory-display{margin:6px auto;min-height:60px;font-size:clamp(1.4rem,7vw,3rem)}
.dl-game .dl-memory-cards{width:min(100%,340px);gap:7px;margin:8px auto}
.dl-game .dl-maze{width:min(100%,360px,var(--dl-board-space,360px));margin:7px auto}
.dl-game .dl-maze-controls{gap:5px}
.dl-game .dl-piece-picker{gap:5px;margin:7px 0}
.dl-game .dl-piece{padding:5px 8px;font-size:.8rem}
.dl-game .dl-shape-board{max-width:380px;margin:8px auto}
.dl-game .dl-clues{padding:8px 12px 8px 28px;margin:7px 0;font-size:.8rem;line-height:1.5}
.dl-game .dl-detective-choice{margin:6px auto;font-size:.9rem}
.dl-game .dl-detective-choice select{padding:6px 8px}
.dl-game .dl-feedback{padding:8px 12px;margin-top:8px;font-size:.77rem;line-height:1.45}
.dl-game .dl-game-actions{gap:7px;margin-top:8px}
.dl-game .dl-game-actions .ds-btn{min-height:38px;padding:8px 12px}
.dl-game .dl-route-map{width:120px;margin:6px auto}
.dl-game .dl-position-grid{grid-template-columns:repeat(3,48px);gap:6px}
@media(orientation:landscape) and (max-height:600px){
 .dl-game-header{padding:5px 12px;flex-wrap:nowrap;gap:8px}
 .dl-game-header strong{font-size:.8rem}.dl-game-header small{font-size:.65rem}
 .dl-game-header .ds-btn{min-height:32px;padding:6px 9px;font-size:.66rem}
 .dl-game-stage .dl-game-content{width:min(1100px,100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,.7fr);column-gap:18px;align-items:center;padding:8px 12px}
 #dl-puzzle{grid-column:1;grid-row:1/6}
 #dl-question-title,#dl-instruction,#dl-feedback,.dl-game-actions{grid-column:2}
 .dl-game .dl-maze{width:min(100%,var(--dl-board-space,210px))}
 .dl-game .dl-memory-cards{width: min(100%,290px);grid-template-columns:repeat(4,minmax(0,1fr))}
 .dl-game .dl-memory-card{font-size:1.5rem;aspect-ratio:1.6}
 .dl-game .dl-memory-display{min-height:38px;font-size:1.7rem}
 .dl-game .dl-shape-board{max-width:300px}
 .dl-game .dl-choice-grid{gap:5px;margin:5px 0}
 .dl-game .dl-choice{min-height:38px;min-width:38px;font-size:1.2rem;padding:5px}
 .dl-game .dl-route-map{width:92px}
}
.dl-game .dl-command-choice{font-size:.76rem;min-height:36px;min-width:0;padding:6px 9px}
.dl-game .dl-answer-sequence{font-size:1rem;line-height:1.4}
.dl-game #dl-puzzle>.ds-btn{min-height:32px;padding:6px 9px;margin:3px;font-size:.72rem}
@media(max-height:700px){.dl-game .dl-route-map{width:96px}.dl-game .dl-game-content>p{font-size:.74rem}}
@media(orientation:landscape) and (max-height:600px){
 .dl-game #dl-puzzle[data-type=detektif]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 10px;align-items:start}
 .dl-game #dl-puzzle[data-type=detektif] .dl-clues{grid-column:1;grid-row:1/7;margin:0;padding:7px 5px 7px 20px;font-size:.72rem;line-height:1.4}
 .dl-game #dl-puzzle[data-type=detektif] .dl-detective-choice{grid-column:2;margin:0;width:100%;gap:4px;font-size:.72rem;align-items:center}
 .dl-game #dl-puzzle[data-type=detektif] select{max-width:60%;padding:5px 3px;min-height:30px;font-size:.72rem}
 .dl-game #dl-puzzle[data-type=detektif] .dl-puzzle-status{grid-column:2}
}

.dl-memory-step{text-align:center;font-size:.72rem;line-height:1.4;min-height:1.4em;color:#50647c;margin:3px 0}
/* Graded-question review: readonly, bounded, and inside the existing fitted game stage. */
.dl-visual-review{display:grid;gap:8px;width:min(100%,760px);margin:auto;text-align:center}.dl-visual-review h3{font-size:1.05rem;margin:0}.dl-review-legend{font-size:.7rem;color:#52677c;margin:0}.dl-review-group{min-width:0}.dl-review-group h4{font-size:.8rem;margin:4px 0 6px}.dl-review-sequence{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}.dl-review-grid{display:grid;grid-template-columns:repeat(var(--review-columns),minmax(0,1fr));gap:3px;max-width:340px;margin:auto}.dl-review-cell{position:relative;display:grid;place-items:center;gap:2px;min-width:0;padding:7px 8px;border:1px solid #d8e2ef;border-radius:7px;background:#f1f5fb;color:#263c55;font-size:clamp(.72rem,2.5vw,1rem);line-height:1.25;overflow-wrap:anywhere}.dl-review-cell small{font-size:.65rem;line-height:1}.dl-review-grid .dl-review-cell{padding:3px;aspect-ratio:1;font-size:clamp(.65rem,2.5vw,.85rem)}.dl-review-cell.is-right{background:#e6f6ec;color:#14643d;border-color:#5baf7c}.dl-review-cell.is-wrong{background:#fff0f0;color:#9d2639;border:2px dashed #b54455}.dl-review-cell.is-wall{background:#334155;color:#fff;border-color:#334155}.dl-review-hold{justify-self:center;min-height:34px;padding:6px 12px;font-size:.76rem}
@media(max-width:600px),(max-height:600px){.dl-visual-review{gap:5px}.dl-review-cell{padding:5px 6px}.dl-review-grid{max-width:250px;gap:2px}.dl-visual-review h3{font-size:.9rem}.dl-review-group h4{font-size:.7rem}.dl-review-legend{font-size:.64rem}}
