:root{--yellow:#ffcf00;--yellow-dark:#e0a800;--red:#e3000b;--ink:#1d2027;--ink-soft:#4a5260;--paper:#f7f9fc;--line:#d4dce6;--booklet:#dbe7f3;--callout:#bcd5ee;--callout-line:#7fa9d4;--blue:#1f6fd1;--green:#1c9b4b;--chrome:#fff;--stage:#eef2f6;--radius:14px;color:var(--ink);font-family:Nunito,system-ui,-apple-system,sans-serif;font-size:17px}*{box-sizing:border-box}html,body{background:var(--stage);height:100%;margin:0;overflow:hidden}button,input,select{font:inherit;color:inherit}button{cursor:pointer}[hidden]{display:none!important}.top{background:var(--yellow);border-bottom:4px solid var(--yellow-dark);z-index:5;align-items:center;gap:18px;height:68px;padding:0 18px;display:flex;position:relative}.brand{white-space:nowrap;align-items:center;gap:4px;font-size:22px;font-weight:900;display:flex}.brand .stud{background:var(--red);border-radius:50%;width:16px;height:16px;margin-right:2px;box-shadow:inset 0 -3px #00000040}.brand .stud+.stud{margin-right:10px}.setname{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:18px;overflow:hidden}.muted{color:var(--ink-soft);font-weight:600}.modes{background:#0000001f;border-radius:999px;gap:2px;padding:4px;display:flex}.modes button{white-space:nowrap;background:0 0;border:0;border-radius:999px;padding:9px 16px;font-size:16px;font-weight:800}.modes button.on{background:var(--chrome);box-shadow:0 2px #0000002e}button.icon{background:#ffffffa6;border:0;border-radius:12px;width:48px;height:48px;font-size:24px;line-height:1}button.icon:hover{background:#fff}main{grid-template-columns:1fr 440px;height:calc(100% - 68px);display:grid}main.booklet-left{grid-template-columns:440px 1fr}main.booklet-left #booklet{border-left:0;border-right:1px solid var(--line);order:-1}main.booklet-hidden{grid-template-columns:1fr}main.booklet-hidden #booklet{display:none}#stage{min-width:0;position:relative;overflow:hidden}#stage canvas{touch-action:none;display:block}.hint{z-index:2;color:#fff;pointer-events:none;white-space:nowrap;text-overflow:ellipsis;background:#1d2027d1;border-radius:999px;max-width:92%;padding:9px 18px;font-size:16px;font-weight:700;position:absolute;top:14px;left:50%;overflow:hidden;transform:translate(-50%)}.hint:empty{display:none}.stepbar{z-index:3;background:var(--chrome);border-radius:18px;align-items:center;gap:12px;padding:10px 12px;display:flex;position:absolute;bottom:16px;left:16px;right:16px;box-shadow:0 6px 24px #141e322e,0 2px #0000000f}.stepbar button.big{background:#e7ecf2;border:0;border-radius:12px;width:58px;height:52px;font-size:22px;font-weight:900}.stepbar button.big.go{background:var(--green);color:#fff;box-shadow:inset 0 -4px #0003}.stepbar button.big:active{transform:translateY(2px)}.stepbar select{border:2px solid var(--line);background:#fff;border-radius:12px;height:48px;padding:0 10px;font-weight:800}.stepnum{white-space:nowrap;font-size:18px;font-weight:800}.stepnum input{border:2px solid var(--line);text-align:center;border-radius:10px;width:78px;height:44px;font-size:20px;font-weight:900}.stepnum span{color:var(--ink-soft)}.progress{background:#e7ecf2;border-radius:999px;flex:1;min-width:80px;height:26px;position:relative;overflow:hidden}.progress div{background:linear-gradient(90deg, var(--yellow), #ffb400);border-radius:999px;transition:width .4s;position:absolute;inset:0 auto 0 0}.progress span{place-items:center;font-size:14px;font-weight:800;display:grid;position:absolute;inset:0}button.icon.small{background:#e7ecf2;width:48px;height:48px}.tray{z-index:3;background:#fffffff5;border-radius:18px;padding:10px 12px;position:absolute;bottom:96px;left:16px;right:16px;box-shadow:0 6px 24px #141e3229}.tray-head{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:8px;display:flex}.tabs{background:#e7ecf2;border-radius:999px;gap:4px;padding:4px;display:flex}.tabs button{background:0 0;border:0;border-radius:999px;padding:6px 14px;font-weight:800}.tabs button.on{background:#fff;box-shadow:0 1px #00000026}#tray-search{border:2px solid var(--line);border-radius:10px;flex:1;min-width:180px;height:40px;padding:0 12px}.palette{flex-wrap:wrap;gap:5px;display:flex}.palette button{border:2px solid #0003;border-radius:7px;width:28px;height:28px}.palette button.on{outline:3px solid var(--blue);outline-offset:1px}.tray-items{gap:10px;min-height:104px;padding-bottom:4px;display:flex;overflow-x:auto}.tray-items:empty:after{content:"Nothing left in this step";color:var(--ink-soft);align-self:center;padding-left:8px;font-weight:700}.part{border:2px solid var(--line);-webkit-user-select:none;user-select:none;touch-action:none;background:#fff;border-radius:12px;flex:none;place-items:center;width:96px;height:100px;display:grid;position:relative}.part:hover{border-color:var(--blue)}.part.held{border-color:var(--yellow-dark);background:#fff7d1}.part img{pointer-events:none;width:80px;height:80px}.part .n{font-size:16px;font-weight:900;position:absolute;bottom:3px;left:6px}.part .ref{color:var(--ink-soft);font-size:11px;font-weight:700;position:absolute;top:3px;right:6px}.part.shake{animation:.35s shake}@keyframes shake{25%{transform:translate(-6px)}50%{transform:translate(6px)}75%{transform:translate(-3px)}}#booklet{background:var(--booklet);border-left:1px solid var(--line);flex-direction:column;min-height:0;display:flex}.bk-head{align-items:center;gap:8px;padding:10px 12px;display:flex}.bk-head button{background:#fff;border:0;border-radius:10px;width:48px;height:44px;font-size:18px;font-weight:900}.bk-title{text-align:center;flex:1;font-size:18px;font-weight:900}.bk-title span{color:var(--ink-soft);font-size:15px;font-weight:700}.bk-body{flex:1;padding:4px 16px 16px;overflow-y:auto}.bk-foot{gap:8px;padding:0 16px 14px;display:flex}.ghost-btn{border:2px solid var(--blue);height:46px;color:var(--blue);background:#fff;border-radius:12px;flex:1;font-weight:800}.page{background:#fff;border-radius:6px;padding:16px;position:relative;box-shadow:0 3px 12px #1e3c6426}.page.current{outline:4px solid var(--yellow)}.page .pnum{color:var(--ink-soft);font-size:13px;font-weight:700;position:absolute;bottom:8px;right:12px}.page .stepno{letter-spacing:-1px;font-size:54px;font-weight:900;line-height:1}.page .bagtag{background:var(--ink);color:#fff;border-radius:8px;padding:4px 10px;font-size:14px;font-weight:800;position:absolute;top:14px;right:14px}.callout{background:var(--callout);border:2px solid var(--callout-line);border-radius:10px;flex-wrap:wrap;gap:4px 10px;margin:10px 0;padding:8px;display:flex}.callout .ci{flex-direction:column;align-items:center;width:64px;display:flex}.callout img{width:60px;height:60px}.callout .ci b{font-size:15px}.subframe{border:3px solid var(--callout-line);background:#eef5fc;border-radius:12px;padding:10px}.subframe .sublabel{color:var(--blue);margin-bottom:4px;font-size:15px;font-weight:800}.repeat{background:var(--ink);color:#fff;border-radius:8px;margin-left:6px;padding:2px 10px;font-weight:900;display:inline-block}.page .shot{background:var(--booklet);aspect-ratio:560/400;border-radius:6px;width:100%;display:block}.attach{color:var(--blue);margin:6px 0;font-weight:800}.bagpage{text-align:center}.bagpage .bagicon{background:linear-gradient(#f4f6f9,#dfe5ec);border:3px solid #b9c4d1;border-radius:14px 14px 22px 22px;place-items:center;width:150px;height:170px;margin:10px auto 14px;font-size:76px;font-weight:900;display:grid;position:relative}.bagpage .bagicon:before{content:"";background:#b9c4d1;border-radius:3px;height:6px;position:absolute;top:12px;left:14px;right:14px}.bagpage .callout{justify-content:center}.bagpage .callout .ci{width:54px}.bagpage .callout img{width:50px;height:50px}.toast{opacity:0;z-index:20;pointer-events:none;background:var(--green);color:#fff;border-radius:999px;padding:12px 24px;font-size:19px;font-weight:900;transition:all .25s;position:fixed;top:86px;left:50%;transform:translate(-50%,-20px);box-shadow:0 6px 20px #0003}.toast.show{opacity:1;transform:translate(-50%)}dialog{border:0;border-radius:20px;width:min(820px,94vw);padding:0;box-shadow:0 20px 60px #00000059}dialog::backdrop{background:#14192373}dialog form{grid-template-columns:1fr 1fr;gap:14px 22px;max-height:88vh;padding:22px 26px;display:grid;overflow-y:auto}dialog h2,dialog label.check,dialog .row{grid-column:1/-1}@media (width<=640px){dialog form{grid-template-columns:1fr}}dialog h2{margin:0 0 4px;font-weight:900}dialog label{gap:6px;font-weight:800;display:grid}dialog label.check{align-items:center;gap:10px;font-weight:700;display:flex}dialog label.check input{width:22px;height:22px}dialog select{border:2px solid var(--line);background:#fff;border-radius:10px;height:46px;padding:0 10px;font-weight:700}dialog .row{justify-content:space-between;gap:10px;margin-top:6px;display:flex}button.primary{background:var(--green);color:#fff;border:0;border-radius:12px;height:48px;padding:0 26px;font-weight:900;box-shadow:inset 0 -4px #0003}button.danger{border:2px solid var(--red);height:48px;color:var(--red);background:#fff;border-radius:12px;padding:0 18px;font-weight:800}#loading,#finished{z-index:30;background:var(--yellow);place-items:center;display:grid;position:fixed;inset:0}#finished{background:#14192380}.load-box,.fin-box{text-align:center;font-size:22px;font-weight:900}.fin-box{background:#fff;border-radius:24px;padding:30px 40px;box-shadow:0 20px 60px #00000059}.fin-box h1{margin:0 0 6px;font-size:48px}.fin-box p{font-size:19px;font-weight:700}.load-bar{background:#00000026;border-radius:999px;width:320px;height:16px;margin:14px auto 0;overflow:hidden}.load-bar div{background:var(--red);width:0;height:100%;transition:width .2s}.brick-anim{justify-content:center;gap:8px;margin-bottom:18px;display:flex}.brick-anim span{background:var(--red);border-radius:5px;width:44px;height:30px;animation:1s infinite hop;position:relative;box-shadow:inset 0 -5px #0003}.brick-anim span:nth-child(2){background:var(--blue);animation-delay:.15s}.brick-anim span:nth-child(3){background:var(--green);animation-delay:.3s}.brick-anim span:before,.brick-anim span:after{content:"";background:inherit;border-radius:3px 3px 0 0;width:14px;height:8px;position:absolute;top:-7px}.brick-anim span:before{left:6px}.brick-anim span:after{right:6px}@keyframes hop{50%{transform:translateY(-12px)}}body.dark{--stage:#1b1f27}body.dark .hint{color:var(--ink);background:#ffffffeb}@media (width<=1100px){main{grid-template-columns:1fr 360px}main.booklet-left{grid-template-columns:360px 1fr}.setname{display:none}}@media (width<=760px){main,main.booklet-left{grid-template-rows:1fr 40%;grid-template-columns:1fr}main.booklet-left #booklet{order:0}.top{gap:6px;padding:0 8px}.modes{flex:1;min-width:0}.modes button{white-space:normal;flex:1;padding:8px 6px;font-size:13px;line-height:1.1}button.icon{flex:none;width:40px;height:40px;font-size:20px}.brand,.progress,#bag-select,#btn-frame{display:none}.stepbar{justify-content:space-between;gap:8px;padding:8px;bottom:8px;left:8px;right:8px}.stepbar button.big{width:52px;height:48px}.stepnum{font-size:16px}.stepnum input{width:64px}.tray{bottom:76px;left:8px;right:8px}.hint{white-space:normal;text-align:center;width:max-content;font-size:14px}}dialog .about{background:#f3f6fa;border-radius:12px;grid-column:1/-1;padding:4px 16px;font-size:15px;font-weight:600;line-height:1.45}dialog .about h3{margin:10px 0 0;font-weight:900}dialog .about a{color:var(--blue)}.load-credit{color:#0000008c;max-width:520px;margin-top:18px;font-size:13px;font-weight:700}
