@font-face{font-family:Andika;src:url(fonts/Andika-Regular.ttf)}@font-face{font-family:Andika;font-weight:700;src:url(fonts/Andika-Bold.ttf)}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}
:root{--navy:#14306b;--blue:#1f5fbf;--red:#e03a3e;--yellow:#ffd23f;--ink:#152347;--mint:#2fb6a0;--NE:#e5484d;--SE:#f08c00;--MW:#2f9e44;--SW:#8b5cf6;--W:#1c7ed6;--NEl:#fde3e4;--SEl:#fff0d6;--MWl:#dcf3e0;--SWl:#ece4ff;--Wl:#dcecff}
body{margin:0;font-family:Andika,"Segoe UI",Arial,sans-serif;background:#eef4ff;background-image:linear-gradient(#dde8fb 1px,transparent 1px),linear-gradient(90deg,#dde8fb 1px,transparent 1px);background-size:28px 28px;color:var(--ink);font-size:18px;line-height:1.35;overflow-x:hidden}
button{font-family:inherit;cursor:pointer;color:inherit;font-size:inherit}a{color:inherit}input{font-family:inherit}
#download-book{position:fixed;top:11px;right:12px;z-index:200;background:var(--yellow);color:#222;font-weight:bold;padding:10px 14px;border-radius:22px;text-decoration:none;box-shadow:0 2px 6px #0003;min-height:44px;display:flex;align-items:center;font-size:15px;white-space:nowrap}
#download-book:hover{background:#ffc400}#download-book .short{display:none}
.top{background:linear-gradient(90deg,var(--navy),#2350a8);color:#fff;display:flex;align-items:center;gap:12px;padding:8px 290px 8px 16px;min-height:66px;border-bottom:5px solid var(--red)}
.brand{color:#fff;text-decoration:none;display:flex;flex-direction:column;line-height:1.05;min-width:0}
.logo{font-weight:700;font-size:27px;white-space:nowrap}.p{color:#a9d4ff}.y{color:var(--yellow)}
.brand small{color:#d3e2ff;font-size:14px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stk{margin-left:auto;background:#ffffff1f;border:2px solid #ffffff55;border-radius:22px;padding:8px 14px;text-decoration:none;color:#fff;font-size:16px;min-height:44px;display:flex;align-items:center;gap:4px;white-space:nowrap;flex:none}
main{max-width:1100px;margin:0 auto;padding:14px 12px 40px}
footer{text-align:center;color:#4a5a80;font-size:14px;padding:6px 12px 40px}footer div{font-weight:700;font-size:16px;color:var(--ink)}footer p{margin:4px}
h1,h2,h3{line-height:1.15}
.panel{background:#fff;border-radius:20px;padding:16px 18px;box-shadow:0 2px 0 #c9d7f3;margin:12px 0}
.btn{background:var(--blue);color:#fff;border:0;border-radius:16px;padding:12px 20px;font-weight:700;min-height:48px;box-shadow:0 4px 0 #0f3a80;font-size:18px;display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.btn:active{transform:translateY(2px);box-shadow:0 2px 0 #0f3a80}
.btn.y{background:var(--yellow);color:#222;box-shadow:0 4px 0 #c99a00}.btn.r{background:var(--red);box-shadow:0 4px 0 #9b1f22}.btn.g{background:#2f9e44;box-shadow:0 4px 0 #1d6b2c}.btn.w{background:#fff;color:var(--ink);border:2px solid #c9d7f3;box-shadow:0 3px 0 #c9d7f3}
.btn.sm{padding:8px 12px;min-height:44px;font-size:16px;border-radius:12px}
.snd{background:#e8f0ff;border:2px solid #b9cdf5;border-radius:14px;min-width:44px;min-height:44px;padding:6px 10px;font-size:18px;font-weight:700;color:var(--navy)}
.snd:hover{background:#d6e5ff}
.back{display:inline-flex;align-items:center;gap:4px;text-decoration:none;font-weight:700;color:var(--blue);min-height:44px;padding:4px 0}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.muted{color:#5b6a8f}
/* home */
.hero{background:linear-gradient(150deg,#14306b 0%,#2350a8 60%,#e03a3e 135%);color:#fff;border-radius:24px;padding:22px 24px;display:grid;grid-template-columns:1.4fr 1fr;gap:16px;align-items:center;position:relative;overflow:hidden}
.hero:before{content:"★ ★ ★ ★ ★ ★ ★";position:absolute;right:-10px;bottom:4px;font-size:46px;color:#ffffff14;white-space:nowrap;letter-spacing:6px}
.hero .tag{display:inline-block;background:var(--yellow);color:#222;border-radius:14px;padding:3px 12px;font-weight:700;font-size:16px}
.hero h1{font-size:40px;margin:10px 0 6px}.hero h1 span{color:var(--yellow)}.hero p{margin:0 0 14px;color:#e6eeff}
.hero .mascot{width:230px;justify-self:center;position:relative}
.bubble{background:#fff;color:var(--ink);border-radius:18px;padding:10px 14px;font-size:16px;position:relative;box-shadow:0 2px 0 #c9d7f3}
.how{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.how div{background:#f1f6ff;border-radius:14px;padding:10px;text-align:center;font-size:15px}.how b{display:block;font-size:26px}
.sec{font-size:22px;margin:18px 4px 8px;color:var(--navy)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.act{background:#fff;border-radius:18px;padding:12px;text-decoration:none;display:flex;gap:10px;align-items:flex-start;border:3px solid var(--c,#1f5fbf);min-height:120px;box-shadow:0 3px 0 #c9d7f3}
.act:hover{transform:translateY(-2px)}
.act .ic{font-size:34px;width:52px;height:52px;flex:none;border-radius:14px;background:var(--cl,#e8f0ff);display:flex;align-items:center;justify-content:center}
.act h3{margin:2px 0 4px;color:var(--c,#1f5fbf);font-size:19px}.act p{margin:0;font-size:15px;color:#4a5a80}
.act .n{display:inline-block;background:var(--c);color:#fff;border-radius:50%;width:22px;height:22px;text-align:center;font-size:13px;line-height:22px;font-weight:700}
/* map */
.map{width:100%;height:auto;display:block;background:#f4f9ff;border-radius:16px;touch-action:manipulation}
.map .st{stroke:#fff;stroke-width:.7;stroke-linejoin:round;cursor:pointer;transition:fill .2s}
.map .st:hover{filter:brightness(1.08)}
.map .st.fade{opacity:.35}
.map .st.sel{stroke:#14306b;stroke-width:2.2}
.map .st.ok{fill:#2f9e44!important}.map .st.bad{fill:#e03a3e!important}
.map .st.hint{animation:blink .5s 4 alternate}
@keyframes blink{from{fill:#ffd23f}to{fill:#14306b}}
.map .box rect{stroke:#14306b;stroke-width:.8;cursor:pointer}.map .box line{stroke:#14306b;stroke-width:.6}.map .box text{font-size:10px;font-weight:700;fill:#14306b;pointer-events:none}
.map .lab{font-size:9px;font-weight:700;fill:#14306b;pointer-events:none;text-anchor:middle;paint-order:stroke;stroke:#fff;stroke-width:2.2px}
.map .capdot{fill:#ffd23f;stroke:#14306b;stroke-width:1;pointer-events:none}
.map .dc{fill:#e03a3e;stroke:#fff;stroke-width:.8}
.zoom{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.zoom button{border:2px solid #c9d7f3;background:#fff;border-radius:12px;padding:6px 12px;min-height:44px;font-weight:700;font-size:15px}
.zoom button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.zoom button i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:4px;vertical-align:-1px}
.explore{display:grid;grid-template-columns:1.6fr 1fr;gap:14px;align-items:start}
.card{background:#fff;border-radius:20px;padding:14px 16px;border-top:10px solid var(--rc,#1f5fbf);box-shadow:0 2px 0 #c9d7f3}
.card .ch{display:flex;gap:12px;align-items:center}.card .shape{width:96px;height:80px;flex:none}
.card h2{margin:0;font-size:30px}.card h2 small{font-size:18px;background:var(--rc);color:#fff;border-radius:8px;padding:1px 8px;vertical-align:4px}
.card .rg{display:inline-block;margin-top:4px;background:var(--rl);color:var(--ink);border-radius:10px;padding:2px 10px;font-weight:700;font-size:15px}
.card dl{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:12px 0}.card dt{font-weight:700;color:#4a5a80;font-size:15px}.card dd{margin:0}
.card ul{margin:6px 0 6px;padding-left:22px}.card li{margin:4px 0}
.card h3{margin:10px 0 4px;display:flex;gap:8px;align-items:center}
.pick{width:100%;min-height:44px;border-radius:12px;border:2px solid #c9d7f3;font-size:17px;padding:6px;font-family:inherit;background:#fff}
/* regions */
.regs{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.reg{background:#fff;border-radius:18px;border:3px solid var(--c);padding:10px;text-decoration:none;text-align:center}
.reg h3{color:var(--c);margin:6px 0 2px}.reg svg{width:100%;height:90px}
.slist{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin-top:10px}
.slist a,.slist button{background:var(--rl,#f1f6ff);border:2px solid transparent;border-radius:12px;padding:8px 10px;text-decoration:none;text-align:left;min-height:48px;font-size:16px}
.slist .on{border-color:var(--navy);background:#fff6cc}
.slist b{display:block}
/* games */
.gbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0}
.pill{background:#fff;border-radius:14px;padding:6px 12px;font-weight:700;box-shadow:0 2px 0 #c9d7f3}
.prompt{font-size:28px;font-weight:700;text-align:center;margin:8px 0;display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}
.prompt b{color:var(--red)}
.opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.opt{background:#fff;border:3px solid #c9d7f3;border-radius:16px;min-height:64px;font-size:22px;font-weight:700;padding:8px;box-shadow:0 3px 0 #c9d7f3}
.opt:hover{border-color:var(--blue)}.opt.ok{background:#d3f5dc;border-color:#2f9e44}.opt.bad{background:#ffe0e0;border-color:#e03a3e}
.opt:disabled{cursor:default}
.intro{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center}
.intro .mascot{width:150px}
.scope{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.scope button{border:2px solid #c9d7f3;background:#fff;border-radius:12px;padding:6px 12px;min-height:44px;font-weight:700;font-size:15px}
.scope button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.result{text-align:center}.result .big{font-size:56px;font-weight:700;color:var(--navy)}.stars{font-size:44px;letter-spacing:4px}
.matchg{display:grid;grid-template-columns:1fr 1fr;gap:10px}.matchg .col{display:flex;flex-direction:column;gap:8px}
.mi{background:#fff;border:3px solid #c9d7f3;border-radius:14px;min-height:56px;font-size:19px;font-weight:700;padding:6px}
.mi.sel{border-color:var(--blue);background:#e8f0ff}.mi.done{background:#d3f5dc;border-color:#2f9e44;opacity:.7}.mi.bad{animation:shake .4s}
@keyframes shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.clues{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.clue{background:#fff;border-left:8px solid var(--yellow);border-radius:12px;padding:10px 12px;font-size:20px;display:flex;gap:8px;align-items:center;justify-content:space-between}
.clue .k{font-weight:700;color:var(--blue);margin-right:6px}
.timer{height:14px;background:#dfe8fb;border-radius:8px;overflow:hidden;margin:6px 0}.timer i{display:block;height:100%;background:linear-gradient(90deg,#2f9e44,#ffd23f,#e03a3e);transition:width .25s linear}
.spellbox{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:8px 0}
.spellbox input{font-size:28px;padding:10px 14px;border-radius:14px;border:3px solid #c9d7f3;width:min(460px,100%);text-align:center;letter-spacing:2px}
.blanks{font-size:26px;letter-spacing:6px;text-align:center;font-weight:700;color:var(--navy);word-break:break-word}
.minimap{max-width:520px;margin:0 auto}
.teams{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:6px 0}
.team{background:#fff;border-radius:16px;padding:8px 16px;font-weight:700;font-size:20px;border:4px solid var(--tc);min-width:120px;text-align:center}
.team b{display:block;font-size:34px;color:var(--tc)}.team.on{background:var(--tc);color:#fff}.team.on b{color:#fff}
.tq{font-size:32px;text-align:center;font-weight:700;margin:10px 0}
.teamsetup input{font-size:18px;padding:8px 10px;border-radius:10px;border:2px solid #c9d7f3;min-height:44px;width:150px}
.chk{display:inline-flex;gap:6px;align-items:center;background:#f1f6ff;border-radius:10px;padding:8px 10px;min-height:44px}
.chk input{width:20px;height:20px}
/* puzzle */
.puz{width:100%;height:auto;max-height:calc(100vh - 190px);display:block;background:#f4f9ff;border-radius:16px;user-select:none;-webkit-user-select:none}
.puz .ghost{fill:#fff;stroke:#7d93c4;stroke-width:.8;stroke-dasharray:3 2}
.puz .ctx{fill:#e6ecf7;stroke:#fff;stroke-width:.6}
.puz .tray{fill:#fff8dc;stroke:#e8cf7a;stroke-width:1}
.puz .pc{cursor:grab;touch-action:none}.puz .pc path{stroke:#14306b;stroke-width:.9}
.puz .pc.drag path{filter:drop-shadow(0 2px 2px #0005)}
.puz .pc.placed{cursor:default}.puz .pc.placed path{stroke:#fff;stroke-width:.7}
/* progress */
.prog{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:10px 0}
.prog div{background:#fff;border-radius:12px;padding:8px;text-align:center;font-weight:700;font-size:15px}
.bar{height:10px;background:#e3eaf8;border-radius:6px;overflow:hidden;margin-top:4px}.bar i{display:block;height:100%}
.chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:6px}.chips b{white-space:nowrap;margin-left:6px}
.chips span{background:#fff;border-radius:10px;padding:6px 8px;font-size:15px;display:flex;justify-content:space-between;border-left:6px solid var(--c)}
/* teacher */
table.key{width:100%;border-collapse:collapse;font-size:15px}table.key th,table.key td{border-bottom:1px solid #dfe6f5;padding:6px;text-align:left;vertical-align:top}
table.key th{background:var(--navy);color:#fff;position:sticky;top:0}table.key tr:nth-child(even) td{background:#f6f9ff}
.tablewrap{overflow-x:auto;max-height:70vh;border-radius:12px}
#toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%) translateY(120px);background:var(--navy);color:#fff;padding:12px 20px;border-radius:16px;font-weight:700;z-index:300;transition:transform .3s,opacity .3s;opacity:0;visibility:hidden;max-width:90vw;text-align:center}
#toast.on{transform:translateX(-50%) translateY(0);opacity:1;visibility:visible}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:250;overflow:hidden}.confetti i{position:absolute;top:-20px;width:10px;height:14px;animation:fall 2.6s linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
@media (max-width:900px){.grid{grid-template-columns:repeat(2,1fr)}.regs{grid-template-columns:repeat(3,1fr)}.explore{grid-template-columns:1fr}}
@media (max-width:640px){
 #download-book .long{display:none}#download-book .short{display:inline}
 .top{padding:8px 96px 8px 12px;gap:8px}.logo{font-size:21px}.brand small{font-size:12px}.stk .lbl{display:none}.stk{padding:6px 10px}
 .hero{grid-template-columns:1fr;text-align:center;padding:18px}.hero h1{font-size:30px}.hero .mascot{width:150px;grid-row:1}
 .how{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}.act{min-height:0}
 .regs{grid-template-columns:repeat(2,1fr)}.prog{grid-template-columns:repeat(2,1fr)}
 .intro{grid-template-columns:80px 1fr}.intro .mascot{width:80px}
 .prompt{font-size:23px}.opt{font-size:19px;min-height:58px}.tq{font-size:24px}.team{min-width:0;font-size:16px;padding:6px 10px}.team b{font-size:26px}
 .card h2{font-size:25px}.mi{font-size:16px}.clue{font-size:17px}.spellbox input{font-size:22px}.blanks{font-size:20px;letter-spacing:4px}
 main{padding:10px 8px 30px}.panel{padding:12px}
}
