:root{--deep:#08192a;--field:#0b2639;--blue:#20a3dc;--pink:#ff4f8b;--sun:#ffd23f;--good:#176c43;--bad:#a71949;--mist:#eff9fd}
body.smmaze-free{background-color:var(--deep);background-image:radial-gradient(circle,#174d68 1.8px,transparent 2.3px);background-size:28px 28px;color:#fff}
.wrap{max-width:1180px;padding:18px 22px 40px}
header{padding:14px 18px;border:3px solid #031522;border-radius:20px;background:#103249;box-shadow:0 6px 0 var(--blue);margin-bottom:28px}
.brand{font:800 1.3rem var(--body);text-decoration:none;text-shadow:none;color:#fff}
.free-badge{background:#f78b1f;color:var(--ink);border:2px solid #031522;border-radius:999px;padding:8px 12px;font-size:.85rem;font-weight:800}
.icon-btn,.btn,.chip{box-shadow:0 4px 0 var(--blue);min-height:44px}
.btn{box-shadow:0 5px 0 var(--pink)}
.btn.go{background:var(--sun)}
.btn.plain,.icon-btn{background:#fff;color:var(--ink)}
.btn:disabled,.icon-btn:disabled{opacity:1;background:#dbe6ed;color:#425c6d;box-shadow:none}
.panel{color:var(--ink);border-color:#031522;box-shadow:7px 7px 0 var(--blue)}
#menu.panel{background:none!important;padding:0!important;border:0;box-shadow:none;color:#fff}
.hero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:20px;padding:26px 30px;background:linear-gradient(120deg,#103952,#082438);border:4px solid #031522;border-radius:26px;box-shadow:0 7px 0 var(--blue);min-height:310px;margin-bottom:32px;overflow:hidden}
.hero>div:last-child{grid-column:1;grid-row:1}
.monster-hero{grid-column:2;grid-row:1;width:100%;animation:none;align-self:stretch;border-radius:18px;overflow:hidden}
.monster-hero img{display:block;width:100%;height:100%;object-fit:cover}
h1{font-size:clamp(2.6rem,5.8vw,4.6rem);color:var(--sun);text-shadow:5px 5px 0 var(--pink);text-decoration:none}
.tagline{color:#6ed5ff;margin-top:20px;font-size:1.3rem}
.subj-pill{background:#f78b1f;color:var(--ink)}
.intro{color:#d5eaf4;max-width:76ch;line-height:1.65}
.me{display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:stretch}
.privacy-note{align-self:center;color:#fff;font-weight:800;line-height:1.6}
.privacy-note small{font-size:.85rem;color:#b8d5e5}
.count{background:var(--sun);color:var(--ink);border-color:#031522;min-width:135px}
.world{padding:20px 22px 24px;background:#0e2d42;border:3px solid #031522;border-radius:22px;box-shadow:0 5px 0 var(--blue);margin-top:24px}
.world:nth-child(3n+1){box-shadow:0 5px 0 var(--sun)}
.world:nth-child(3n){box-shadow:0 5px 0 var(--pink)}
.world h2{color:#fff;font-size:1.6rem}
.world p{color:#bcdce9;margin:5px 0 18px}
.lvls{grid-template-columns:repeat(10,minmax(0,1fr));gap:10px}
.lvl{background:#143e55;color:#fff;border:2px solid #3e7896;box-shadow:0 3px 0 #031522;min-height:74px}
.lvl.next{background:var(--sun);color:var(--ink);border-color:var(--sun)}
.lvl.done{background:#e6f9ee;color:var(--ink)}
.stars{color:#875e00;-webkit-text-stroke:0}
.lvl .stars{color:#ffda55;letter-spacing:0;font-size:.85rem}
.lvl.next .stars,.lvl.done .stars{color:#6b4900}
#menu details{background:#fff;color:var(--ink);border-color:#4d7286}
.evidence{color:#bdd9e8;font-size:.85rem}
#today{display:none}
#play.panel{background:linear-gradient(#f78b1f 0 10px,#fff 10px)!important;padding-top:28px!important}
.play-top .world-name{color:#89500b}
.play-top h2{color:var(--ink);text-decoration:none}
.callout{background:#fff3be;line-height:1.55}
.callout strong{color:#774909}
.box{background:#eff9fd;border:3px solid #15394d;min-width:0}
.box h3{color:var(--ink)}
.board{box-shadow:0 8px 18px #102c4030;border-radius:14px;border-color:#052033}
.tile.w{background:linear-gradient(145deg,#1d5370,#0e3049 70%);box-shadow:inset 0 3px 0 #20a3dc,inset 3px 0 0 #237595,inset 0 -5px 0 #051c2c}
.tile.f{background:radial-gradient(circle at 50% 50%,#fff,#e6f6fd);box-shadow:inset 0 0 0 1px #cbe6f1}
.tile.s{background:#fff2b8;box-shadow:inset 0 0 0 2px #d7b84c}
.tile:has(svg){isolation:isolate}
.tile svg{filter:drop-shadow(0 2px 1px #102c4033)}
.mon .body{inset:3%;filter:drop-shadow(0 2px 1px #03152266)}
.mon .dir{z-index:3}
.mon .dir::after{top:1px;margin-left:-6px;border-width:6px;border-bottom-width:9px;border-top:0;filter:drop-shadow(0 0 2px #031522)}
.controls{gap:10px}
.controls label{display:flex;align-items:center;gap:6px}
.controls select{min-height:44px}
.maze-text{font-size:.85rem;border-color:#91b8ca;border-width:2px;background:#fff;color:var(--ink)}
.maze-text p{line-height:1.5}
.maze-text pre{font:700 clamp(.65rem,2.1vw,.9rem)/1.5 ui-monospace,monospace;overflow-x:auto}
.ws{min-height:150px}
.chip{min-height:46px;box-shadow:0 3px 0 #173a4d;padding:8px 12px}
.mini{width:44px;height:44px;flex:none;min-width:44px}
.blk-row{gap:4px}
.blk-row>div:first-child{min-width:0}
.blk-label{font-size:.9rem}
.blk select{max-width:100%;min-height:40px}
.inner{margin-left:10px}
.slot{min-height:44px;color:#435f72}
.slot.active{color:var(--ink)}
.ws-foot .note{color:#435f72}
.msg.good{color:#176c43}
.msg.bad{color:#a71949}
.result{box-shadow:0 5px 0 var(--pink);background:#fff2b9}
.result .stars{color:#6b4900}
.result h4{color:var(--ink)}
.result .btn{white-space:normal;max-width:100%;line-height:1.2}
.support-note{background:#fff2b9;color:var(--ink);padding:12px 16px;border:2px solid #b39437;border-radius:14px;font-size:.9rem;line-height:1.6;margin-top:14px}
:focus-visible{outline:4px solid #ff4f8b;outline-offset:3px}
@media(max-width:900px){.lvls{grid-template-columns:repeat(5,minmax(0,1fr))}.hero{padding:24px;grid-template-columns:1fr 1fr}.play{grid-template-columns:1fr}}
@media(max-width:560px){.wrap{padding:12px 10px 30px}header{padding:12px;gap:10px}.brand{font-size:1.1rem}.free-badge{font-size:.75rem}.topnav{order:3;width:100%;margin:0}.topnav .icon-btn{width:100%;text-align:center}.hero{grid-template-columns:1fr;padding:22px 18px}.hero>div:last-child{grid-row:1;grid-column:1}.monster-hero{grid-row:2;grid-column:1;height:200px;margin-top:8px}.me{grid-template-columns:1fr 1fr}.privacy-note{grid-column:1/-1}.count{min-width:0}.world{padding:17px 14px 20px}.lvls{gap:8px}.lvl{min-height:66px}.panel{padding:14px}.box{padding:10px}.mini{min-width:36px;width:36px;height:44px}.blk-row{flex-wrap:wrap!important}.blk-row>div:first-child{flex-basis:100%!important}.inner{margin-left:4px}.btn-row{gap:10px}.play-top{gap:10px}.play-top h2{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-width:560px){.mini{width:44px;min-width:44px}}
@media(max-width:360px){.lvls{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* The maze and editor share the available classroom viewport. */
body.smmaze-free.sm-free-full-view .wrap{height:100dvh;max-width:1360px;padding:8px 12px;margin:0 auto}
body.smmaze-free.sm-free-full-view header,body.smmaze-free.sm-free-full-view footer{display:none}
body.smmaze-free.sm-free-full-view #play.panel{padding:14px!important;box-shadow:none}
body.smmaze-free.sm-free-full-view .play-top{gap:8px;margin-bottom:8px}
body.smmaze-free.sm-free-full-view .play-top h2{font-size:1.35rem;margin:0}
body.smmaze-free.sm-free-full-view .play-top .world-name{font-size:.95rem}
body.smmaze-free.sm-free-full-view .callout{padding:8px 12px;margin-bottom:10px;font-size:.9rem;line-height:1.4}
@media(min-width:760px){
  body.smmaze-free.sm-free-full-view .wrap>main{height:100%;min-height:0}
  body.smmaze-free.sm-free-full-view #play{height:100%;display:flex;flex-direction:column;min-height:0}
  body.smmaze-free.sm-free-full-view #play[hidden]{display:none}
  body.smmaze-free.sm-free-full-view .play{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:12px;flex:1;min-height:0;align-items:stretch}
  body.smmaze-free.sm-free-full-view .box{display:flex;flex-direction:column;min-height:0;overflow:auto;overscroll-behavior:contain;padding:10px}
  body.smmaze-free.sm-free-full-view .box h3{font-size:1.15rem;margin-bottom:6px;flex-shrink:0}
  body.smmaze-free.sm-free-full-view .board-wrap{flex:1;min-height:80px;align-items:center;overflow:hidden}
  body.smmaze-free.sm-free-full-view .maze-text{flex-shrink:0;margin:8px 0 0;padding:6px 10px;font-size:.8rem;max-height:32%;overflow:auto}
  body.smmaze-free.sm-free-full-view .maze-text summary{min-height:28px}
  body.smmaze-free.sm-free-full-view .controls{margin-top:8px;gap:6px;flex-shrink:0}
  body.smmaze-free.sm-free-full-view .controls .btn{font-size:1rem;padding:8px 8px;min-height:44px}
  body.smmaze-free.sm-free-full-view .msg{margin:8px 0 0;font-size:.9rem;min-height:1.4em;flex-shrink:0}
  body.smmaze-free.sm-free-full-view .result{max-height:38%;overflow:auto;flex-shrink:0;margin-top:8px;padding:8px}
  body.smmaze-free.sm-free-full-view .result h4{font-size:1.25rem}
  body.smmaze-free.sm-free-full-view .result .stars{font-size:1.4rem}
  body.smmaze-free.sm-free-full-view .result p{font-size:.85rem}
  body.smmaze-free.sm-free-full-view .toolbox{flex-shrink:0;max-height:40%;overflow:auto;padding:2px 4px 6px;gap:6px;margin-bottom:6px}
  body.smmaze-free.sm-free-full-view .chip{font-size:.85rem;padding:6px 8px;min-height:44px}
  body.smmaze-free.sm-free-full-view .ws{flex:1;min-height:70px;overflow:auto;overscroll-behavior:contain;scroll-padding:6px;padding:6px}
  body.smmaze-free.sm-free-full-view .ws-foot{flex-shrink:0;gap:6px;margin-top:6px;font-size:.8rem}
  body.smmaze-free.sm-free-full-view .ws-foot .note{font-size:.8rem;line-height:1.4}
}
@media(max-width:759px){body.smmaze-free.sm-free-full-view .play{grid-template-columns:1fr}body.smmaze-free.sm-free-full-view .play-top h2{flex-basis:auto}}

@media(min-width:760px){body.smmaze-free.sm-free-full-view .controls label{font-size:.8rem;gap:4px}body.smmaze-free.sm-free-full-view .controls select{font-size:.85rem}body.smmaze-free.sm-free-full-view .result .btn{font-size:1rem;min-height:44px;padding:8px 12px}}
