@font-face{font-family:'PLPixel';src:url(pixel.ttf) format('truetype');font-display:block}@font-face{font-family:'PLPixel';src:url(num.ttf) format('truetype');unicode-range:U+30-39,U+23;size-adjust:84%;font-display:block}@font-face{font-family:'PLNum';src:url(num.ttf) format('truetype');size-adjust:84%;font-display:block}@font-face{font-family:'PLPixel';src:url(he.ttf) format('truetype');unicode-range:U+0590-05FF,U+20AA;size-adjust:118%;font-display:block}
:root{--eo:cubic-bezier(0.23,1,0.32,1);--cy:#b5f1ff;--sa:#ff8d84;--li:#b9a7ff;--ye:#ffee82;--mi:#9dffe0;--pk:#ffabab;--gr:#b4f08c;--desk:#2ea9c9;--px:'PLPixel',Geneva,Verdana,sans-serif;
 --d50:repeating-conic-gradient(#000 0 25%,transparent 0 50%) 0 0/4px 4px;
 --chk:repeating-conic-gradient(#cfcfcf 0 25%,#fff 0 50%) 0 0/16px 16px;
 --scales:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v2h-1zM7 0h1v2h-1zM1 2h1v1h-1zM6 2h1v1h-1zM2 3h4v1h-4zM3 4h2v2h-2zM2 6h1v1h-1zM5 6h1v1h-1zM0 7h2v1h-2zM6 7h2v1h-2z'/%3E%3C/svg%3E")}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--scales) var(--desk);color:#000;font:15px/1.3 var(--px);font-synthesis:none;letter-spacing:.01em;overflow:hidden;-webkit-text-size-adjust:100%;display:grid;grid-template-rows:32px minmax(0,1fr);height:100dvh}
h1,h2,h3,p{margin:0}
.pxf{font-family:var(--px);font-size:20px;line-height:1;font-weight:400;letter-spacing:.01em}
button,input{font:inherit;color:#000}
button{cursor:pointer;touch-action:manipulation}
.btn{min-height:34px;padding:0 14px;border:2px solid #000;border-radius:0;background:#fff;font-weight:700;white-space:nowrap}
.btn:active,.btn.on{background:#000;color:#fff}
.btn.df{box-shadow:0 0 0 2px #fff,0 0 0 5px #000;margin:5px}
.btn:disabled{color:#666;border-style:dotted;cursor:default;background:#fff}
.btn.sm{min-height:30px;padding:0 10px;border-radius:0;font-size:14px}
:focus-visible{outline:3px solid #000;outline-offset:2px;box-shadow:0 0 0 2px #fff}
.tool:focus-visible,.slot:focus-visible,.pt:focus-visible,.tl:focus-visible,.idea:focus-visible,#tabs button:focus-visible,.keys button:focus-visible,.menu button:focus-visible,.mb>button:focus-visible{outline:3px solid #000;outline-offset:-7px;box-shadow:inset 0 0 0 4px #fff}
.btn.df:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 5px #000,0 0 0 7px #fff}
.err{color:#000;font-weight:700;font-size:14px;margin:0}.err:empty{display:none}.err::before{content:"! "}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

/* menu bar */
#menubar{position:relative;z-index:40;display:flex;align-items:stretch;background:#fff;border-bottom:2px solid #000;border-radius:0;padding:0 10px;min-width:0}
#brand{display:flex;align-items:center;padding:0 10px 0 4px;border:0;background:none}#brand canvas{display:block;height:13px;width:auto;image-rendering:pixelated}#brand:active canvas{filter:invert(1);background:#fff;outline:4px solid #fff}
.mb{position:relative}
.mb>button{height:100%;border:0;background:#fff;padding:0 12px;display:flex;align-items:center}
.mb.open>button{background:#000;color:#fff}
.menu{position:absolute;left:0;top:100%;min-width:230px;background:#fff;border:2px solid #000;box-shadow:3px 3px 0 #000;padding:3px 0;display:none}
.mb.open .menu{display:block}
.menu button{display:flex;justify-content:space-between;gap:24px;width:100%;border:0;background:#fff;padding:7px 16px;text-align:start;font-weight:700;white-space:nowrap}
.menu button:hover{background:#000;color:#fff}
.menu button:disabled{color:#666;background:#fff}
.menu hr{border:0;border-top:2px dotted #000;margin:3px 0}
#menubar .sp{flex:1}
#helpT{align-self:center;height:24px;min-width:74px;white-space:nowrap;border:2px solid #000;border-radius:0;background:var(--ye);padding:0 10px}
#helpT[aria-pressed=true]{background:#000;color:#fff}

/* desktop */
#desk{display:grid;grid-template-columns:84px minmax(0,1fr) 520px;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"tools pic ideas" "tools pic ctl";gap:12px;padding:14px;min-height:0}
.win{background:#fff;border:2px solid #000;box-shadow:3px 3px 0 #000;display:flex;flex-direction:column;min-width:0;min-height:0}
.tb{flex:none;position:relative;height:26px;border-bottom:2px solid #000;display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(#000 0 2px,#fff 2px 4px) 6px 6px/calc(100% - 12px) 12px no-repeat #fff}
.tb .tt{background:#fff;padding:0 10px;max-width:calc(100% - 70px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb .cb{position:absolute;left:10px;top:3px;width:18px;height:18px;border:2px solid #000;background:#fff;box-shadow:0 0 0 2px #fff;padding:0}
.tb .cb::after{content:"";position:absolute;inset:-14px}
.tb .cb:active{background:var(--d50) #fff}

/* tools */
#tools{grid-area:tools;display:grid;gap:2px;background:#000;border:2px solid #000;box-shadow:3px 3px 0 #000;align-self:start}
.tool{border:0;background:var(--pk);display:grid;justify-items:center;align-content:center;gap:3px;padding:7px 2px 6px;min-height:60px;font-size:13px;font-weight:700}
.tool svg{width:26px;height:26px}
.tool:active,.tool.on{background:#000;color:#fff}.tool:active path,.tool.on path{fill:#fff}
.tool:disabled{cursor:default}.tool:disabled svg{opacity:.3}.tool:disabled span{opacity:.5}

/* picture */
#wPic{grid-area:pic}
#box{position:relative;flex:1;display:grid;place-items:center;min-height:0;margin:10px;overflow:hidden}
#art{position:relative;line-height:0;border:0;padding:0;margin:0;background:none;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;display:block;width:max-content;height:max-content;place-self:center;border-radius:0}
#art.clear{background:var(--chk)}
#cv,#cv2{display:block;image-rendering:pixelated}
#art.ants::after{content:"";position:absolute;inset:-6px;pointer-events:none;background:linear-gradient(90deg,#000 50%,#fff 0) 0 0/10px 2px repeat-x,linear-gradient(90deg,#000 50%,#fff 0) 0 100%/10px 2px repeat-x,linear-gradient(0deg,#000 50%,#fff 0) 0 0/2px 10px repeat-y,linear-gradient(0deg,#000 50%,#fff 0) 100% 0/2px 10px repeat-y;animation:ants .8s steps(10) infinite}
@keyframes ants{to{background-position:10px 0,-10px 100%,0 -10px,100% 10px}}
#selbox{position:absolute;pointer-events:none;outline:2px dashed #000;box-shadow:0 0 0 2px #fff inset;display:none}
#enl{position:absolute;right:0;bottom:0;background:#fff;border:2px solid #000;border-radius:0;padding:3px 8px 2px;font-size:14px;font-weight:700;pointer-events:none}
#foot{flex:none;border-top:2px solid #000;padding:6px 12px;min-height:44px;display:flex;align-items:center;gap:10px;background:#fff}
#note{font-size:15px;flex:1;min-width:0}#note.try{font-weight:700}
body.dragging #box::after{content:"Drop it here";position:absolute;inset:0;display:grid;place-items:center;background:var(--ye);font-size:22px;font-weight:700;outline:2px dashed #000;outline-offset:-4px;z-index:8}

/* ideas */
#wIdeas{grid-area:ideas}
.ideas{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;background:#000}
.idea{display:grid;grid-template-rows:auto auto auto;border:0;padding:0;background:#fff;text-align:start;min-width:0}
.idea .hd{padding:5px 7px 4px;font-size:14px;font-weight:700;border-bottom:2px solid #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.idea:nth-child(1) .hd{background:var(--cy)}.idea:nth-child(2) .hd{background:var(--sa)}.idea:nth-child(3) .hd{background:var(--ye)}.idea:nth-child(4) .hd{background:var(--li)}
.pv{display:grid;place-items:center;min-height:0;min-width:0;overflow:hidden;line-height:0}
.pv canvas{display:block;image-rendering:pixelated}
.idea .pv{height:86px;padding:5px}
.idea .lb{padding:4px 7px 5px;font-size:14px;line-height:1.25;border-top:2px solid #000;min-height:38px;font-weight:700}
.idea:hover .lb,.idea:focus-visible .lb{background:#000;color:#fff}
.ifoot{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:2px solid #000;padding:6px 10px;background:#fff;flex-wrap:wrap}
.ifoot span{font-size:14px;flex:1;min-width:150px}

/* control panel */
#wCtl{grid-area:ctl}
#slots{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:2px;background:#000;border-bottom:2px solid #000}
.slot{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:8px;border:0;background:var(--ye);padding:5px 8px;min-height:52px;text-align:start;min-width:0}
.slot .pv{width:54px;height:40px;background:#fff;border:2px solid #000}
.slot .nm{min-width:0}.slot .nm b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot .nm small{font-size:14px}
.slot.cur{background:#000;color:#fff}.slot.cur .pv{border-color:#fff}
.slot.empty .pv{font-size:26px;font-weight:700;line-height:1;background:#fff;border-style:dashed;color:#000}
#tabs{flex:none;display:flex;background:#000;gap:2px;border-bottom:2px solid #000}
#tabs button{flex:1;border:0;background:#fff;min-height:38px;padding:0 2px;min-width:0}
#tabs button[aria-selected=true]{background:#000;color:#fff}
#tabs button[aria-selected=true]::after{content:"";display:block;height:3px;margin:2px 8px 0;background:var(--d50) #fff}
#panel{flex:1;overflow:auto;min-height:0;background:#fff;overscroll-behavior:contain}
.intro{padding:8px 12px;font-size:14px;border-bottom:2px solid #000;background:#fff}
.cells{display:grid;grid-template-columns:1fr 1fr;gap:2px;background:#000;border-bottom:2px solid #000}
.cell{position:relative;padding:8px 12px 10px;min-width:0;display:flex;flex-direction:column;gap:6px;background:#fff}
.cell.w{grid-column:1/-1}
.cell>.cl{display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:700;font-size:15px}
.cell>.cl output{font-weight:700;background:#fff;border:2px solid #000;min-width:34px;text-align:center;padding:0 5px;line-height:18px}
.hp{display:none;font-size:14px;background:var(--ye);border:2px solid #000;border-radius:0;padding:5px 8px;margin:0}
body.help .hp{display:block}
.k-cy{background:var(--cy)}.k-sa{background:var(--sa)}.k-li{background:var(--li)}.k-ye{background:var(--ye)}.k-mi{background:var(--mi)}.k-pk{background:var(--pk)}.k-gr{background:var(--gr)}
.ico{width:22px;height:22px;flex:none}
.sl{position:relative;display:flex;align-items:center;gap:8px;touch-action:none;cursor:pointer;user-select:none;-webkit-user-select:none;min-height:36px}
.sl .trk{position:relative;flex:1;height:16px;border:2px solid #000;border-radius:0;background:var(--d50) #8f7df0}
.sl .th{position:absolute;top:-9px;left:calc(var(--p)*(100% - 18px));width:18px;height:30px;border:2px solid #000;border-radius:0;background:var(--gr);box-shadow:inset 0 0 0 2px #fff}
.sl.drag .th{background:#000;box-shadow:none}
.ends{display:flex;justify-content:space-between;font-size:14px}
.rads{display:grid;grid-template-columns:repeat(3,1fr);justify-items:center;gap:2px}
.rad{border:0;background:none;display:grid;justify-items:center;gap:3px;padding:2px 6px;min-width:48px;min-height:44px}
.rad i{width:20px;height:20px;border:2px solid #000;border-radius:0;background:#fff;display:grid;place-items:center}
.rad.on i::after{content:"";width:10px;height:10px;border-radius:0;background:#000}
.rad.row{grid-auto-flow:column;gap:8px;align-items:center;justify-items:start;font-weight:700;padding:2px 0}
.xb{display:flex;align-items:center;gap:8px;border:0;background:none;padding:4px 0;font-weight:700;font-size:14px;min-height:44px;text-align:start}
.xb i{width:18px;height:18px;border:2px solid #000;background:#fff;flex:none}
.xb.on i{background:linear-gradient(45deg,transparent 44%,#000 44% 56%,transparent 56%),linear-gradient(-45deg,transparent 44%,#000 44% 56%,transparent 56%) #fff}
.keys{display:inline-flex;border:2px solid #000;background:#000;gap:2px;align-self:flex-start}
.keys button{border:0;background:#fff;min-width:40px;height:40px;padding:0 6px;font-weight:700}
.keys button.on{background:#000;color:#fff}
.lines{display:grid;background:#fff;border:2px solid #000;padding:3px 0}
.lines button{border:0;background:none;display:grid;grid-template-columns:22px 1fr;align-items:center;height:26px;padding:0 8px 0 2px}
.lines button b{height:var(--t);background:#000}
.lines button.z b{height:2px;background:linear-gradient(90deg,#000 50%,transparent 0) 0 0/6px 2px}
.lines button::before{content:""}
.lines button.on::before,.ck::before{content:"";width:9px;height:5px;border-left:2px solid #000;border-bottom:2px solid #000;transform:rotate(-45deg) translate(1px,-1px);justify-self:center}
.lr{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.dial{position:relative;width:60px;height:60px;border:2px solid #000;border-radius:0;cursor:grab;touch-action:none;background:var(--d50) var(--ye);flex:none}
.dial i{position:absolute;left:50%;top:50%;width:46%;height:2px;margin-top:-1px;background:#000;transform-origin:0 50%}
.dial i::after{content:"";position:absolute;right:-8px;top:-7px;width:12px;height:12px;background:#fff;border:2px solid #000;border-radius:0}
.dial.off{pointer-events:none;border-style:dashed;background:#fff}.dial.off i{opacity:.35}
.acts{display:flex;flex-wrap:wrap;gap:6px}
.skip{padding:8px 12px;font-size:14px;border-bottom:2px solid #000;background:var(--d50) #fff}.skip span{background:#fff;padding:1px 4px;-webkit-box-decoration-break:clone;box-decoration-break:clone;line-height:1.6}

/* effect grid */
.fxg{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;background:#000}
.pt{border:0;background:#fff;padding:0;display:grid;grid-template-rows:84px auto;min-width:0;text-align:start}
.pt .pv{padding:5px}
.pt .lb{border-top:2px solid #000;padding:4px 6px 5px;font-weight:700;font-size:14px;display:flex;gap:5px;align-items:center;min-height:28px}
.pt.on .lb{background:#000;color:#fff}.pt.on .lb::before{content:"";width:8px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translateY(-1px);flex:none}
.pt:hover{background:var(--ye)}
.pt:disabled{background:var(--d50) #fff;cursor:default;color:#000}.pt.used .pv{opacity:.3}.pt.used .lb{background:#fff}.pt.used .lb::after{content:"in use";margin-inline-start:auto;font-weight:400;font-size:13px}

/* pattern */
.bands{display:flex;flex-wrap:wrap;gap:6px}
.bd{position:relative;border:2px solid #000;background:#fff;padding:0;width:46px;height:46px;display:grid;grid-template-rows:1fr 14px}
.bd canvas{width:100%;height:28px;image-rendering:pixelated;display:block}
.bd span{font-size:13px;font-weight:700;line-height:14px;text-align:center;border-top:2px solid #000;background:#fff}
.bd.all{width:auto;min-width:64px;grid-template-rows:1fr;place-items:center;font-weight:700;padding:0 8px}
.bd.on{box-shadow:0 0 0 2px #fff,0 0 0 5px #000}.bd.on span,.bd.all.on{background:#000;color:#fff}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;background:#000}
.tl{border:0;background:#fff;padding:0;display:grid;grid-template-rows:78px auto;min-width:0;text-align:start}
.tl .pv{padding:3px;position:relative}
.tl .sw{position:absolute;right:3px;bottom:3px;width:26px;height:26px;border:2px solid #000;image-rendering:pixelated;background:#fff}
.tl .lb{border-top:2px solid #000;padding:3px 5px 4px;font-size:13px;font-weight:700;display:flex;gap:4px;align-items:center;min-height:26px;white-space:nowrap;overflow:hidden}
.tl.on .lb{background:#000;color:#fff}.tl.on .lb::before{content:"";width:8px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translateY(-1px);flex:none}

/* colours */
.pres{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.pres button{border:2px solid #000;background:#fff;padding:0;min-height:40px;display:grid;grid-template-rows:1fr auto;min-width:0}
.pres button i{display:flex;min-height:18px}.pres i b{flex:1}
.pres button span{font-size:13px;font-weight:700;border-top:2px solid #000;padding:1px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pres button.on span{background:#000;color:#fff}
.chips{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.chip{position:relative;width:46px;height:46px;border:2px solid #000;padding:0;display:grid;place-items:end center}
.chip span{font-size:13px;font-weight:700;background:#fff;border:2px solid #000;border-bottom:0;padding:0 4px;line-height:13px;margin-bottom:-2px}
.chip.on{box-shadow:0 0 0 2px #fff,0 0 0 5px #000}.chip.on span{background:#000;color:#fff}
.chip.lk::after{content:"";position:absolute;right:-2px;top:-2px;width:14px;height:14px;background:#000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M2 1h3v1h-3zM2 2h1v1h-1zM4 2h1v1h-1zM1 3h5v3h-5z'/%3E%3C/svg%3E") center/10px no-repeat}
.chip.add{background:var(--d50) #fff;place-items:center;font-size:22px;font-weight:700}
.chip.drop{outline:3px dashed #000;outline-offset:3px}
.ed{display:grid;gap:8px;border:2px solid #000;padding:8px;background:#fff}
.ed .r{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
input[type=color]{width:46px;height:40px;border:2px solid #000;border-radius:0;padding:0;background:#fff}
.hex{width:96px;height:40px;border:2px solid #000;border-radius:0;padding:0 8px;font:16px/1 var(--px);text-transform:uppercase;background:#fff}
.hex.bad{background:var(--sa)}

/* balloon */
#balloon{position:fixed;z-index:80;max-width:260px;background:var(--ye);border:2px solid #000;border-radius:0;padding:9px 12px;font-size:14px;line-height:1.35;pointer-events:none;box-shadow:2px 2px 0 #000}
#balloon::after{content:"";position:absolute;left:var(--tx,30px);bottom:-9px;width:14px;height:14px;background:var(--ye);border-right:2px solid #000;border-bottom:2px solid #000;transform:rotate(45deg) skew(12deg,12deg)}
#balloon.dn::after{bottom:auto;top:-9px;border:0;border-left:2px solid #000;border-top:2px solid #000}

/* dialogs */
dialog{border:2px solid #000;box-shadow:5px 5px 0 #000;padding:0;background:#fff;color:#000;width:min(440px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
dialog::backdrop{background:rgba(255,255,255,.4)}
.db{padding:14px 16px 6px;display:grid;gap:10px;overflow:auto;min-height:0}
.da{flex:none;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:8px 12px 12px;flex-wrap:wrap}
.ab{display:grid;grid-template-columns:44px 1fr;gap:14px;padding:16px 16px 4px;overflow:auto}.ab p{margin:0 0 6px}
#word{height:44px;border:2px solid #000;padding:0 10px;font:20px/1 var(--px);width:100%;border-radius:0;outline:0;background:#fff}
#word:focus{box-shadow:inset 0 0 0 2px #000}
.frow{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:0 12px}
#wordPv{height:96px;border:2px solid #000;background:#fff}
.pg{height:14px;border:2px solid #000;position:relative;background:#fff}
.pg::after{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--p,0)*100%);background:var(--d50) #8f7df0}
#st:empty{height:18px}#st{font-size:14px;line-height:1.3;flex:none;overflow-wrap:anywhere}
#chk{font-size:14px;border:2px solid #000;padding:8px 10px;background:var(--mi)}#chk:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);border:0;padding:0}#chk.bad{background:var(--sa)}#chk ul{margin:4px 0 0;padding-left:18px}
#dLook{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-width:none;max-height:none}
#lookBox{flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;margin:10px}
#lookBox.clear>canvas{background:var(--chk)}
.zr{position:fixed;z-index:60;border:2px solid #000;pointer-events:none;opacity:0}

/* things the browser draws, in the same ink */
::selection{background:#000;color:#fff}
input{caret-color:#000}
a{color:#000;font-weight:700;text-underline-offset:3px;text-decoration-thickness:2px}
#panel::-webkit-scrollbar,.db::-webkit-scrollbar{width:16px}
#panel::-webkit-scrollbar-track,.db::-webkit-scrollbar-track{background:var(--d50) #fff;border-left:2px solid #000}
#panel::-webkit-scrollbar-thumb,.db::-webkit-scrollbar-thumb{background:#fff;border:2px solid #000;border-right:0}

/* the picture as a control */
#art.grab{cursor:grabbing}
#hud{position:absolute;left:50%;top:8px;transform:translateX(-50%);z-index:6;background:#000;color:#fff;font-family:var(--px);font-size:22px;line-height:1;padding:5px 12px 4px;box-shadow:0 0 0 2px #fff;white-space:nowrap;pointer-events:none}
#picFix{position:absolute;left:0;top:0;z-index:5;background:#fff;border:2px solid #000;border-radius:0;padding:3px 8px 2px;font-size:13px;font-weight:700;line-height:1.35}
#picFix::after{content:"";position:absolute;inset:-4px -8px -14px -4px}
#picFix:active{background:#000;color:#fff}
#fPlay{order:-1;flex:none;width:36px;height:30px;border:2px solid #000;border-radius:0;background:#fff;display:grid;place-items:center;padding:0}
#fPlay svg{width:16px;height:16px}#fPlay:active{background:#000}#fPlay:active path{fill:#fff}
.scrub{flex:0 0 clamp(150px,24%,280px);min-height:30px}
.scrub .trk{height:14px;border-radius:0;background:repeating-linear-gradient(90deg,#000 0 2px,#fff 2px 7px)}
.scrub .th{top:-7px;width:12px;height:24px;border-radius:0;left:calc(var(--p)*(100% - 12px));background:var(--pk)}
body.loading #box::after{content:"Reading your picture";position:absolute;inset:0;display:grid;place-items:center;background:var(--d50) #fff;font-family:var(--px);font-size:24px;z-index:8;text-shadow:2px 0 #fff,-2px 0 #fff,0 2px #fff,0 -2px #fff,2px 2px #fff,-2px -2px #fff,2px -2px #fff,-2px 2px #fff}

#empty{position:absolute;inset:0;z-index:7;display:grid;place-content:center;justify-items:center;gap:10px;padding:16px;text-align:center;background:var(--d50) #fff}
#empty[hidden]{display:none}
#empty h2{font-size:28px;background:#fff;padding:2px 10px}#empty p{background:#fff;padding:4px 10px;max-width:38ch;font-size:15px}#empty .acts{justify-content:center}
/* motion: every move explains a change, and none of it covers the picture */
.btn{transition:transform .1s var(--eo)}
.btn:active{transform:translate(1px,1px)}
.tool svg,.slot .pv,.pt .pv canvas{transition:transform .12s var(--eo)}
.tool:active svg{transform:translateY(2px)}
.sl .th{transition:transform .12s var(--eo)}
.sl.drag .th{transform:scale(1.12)}
.chip,.bd{transition:transform .12s var(--eo)}
.chip.on,.bd.on{transform:translateY(-2px)}
.menu button.blink{animation:blink .14s steps(1) both}
@keyframes blink{0%,66%{background:#000;color:#fff}33%{background:#fff;color:#000}}
@keyframes winIn{from{opacity:0;transform:translateY(12px) scale(.97)}}
@keyframes barIn{from{opacity:0;transform:translateY(-100%)}}
@keyframes dlgIn{from{opacity:0;transform:scale(.96)}}
@keyframes fadeIn{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:scale(.94)}}
#menubar{animation:barIn .32s var(--eo) both}
#tools{animation:winIn .36s var(--eo) .04s both}
#wPic{animation:winIn .36s var(--eo) .1s both}
#wIdeas{animation:winIn .36s var(--eo) .18s both}
#wCtl{animation:winIn .36s var(--eo) .26s both}
dialog[open]{animation:dlgIn .2s var(--eo)}
dialog[open]::backdrop{animation:fadeIn .2s ease}
#balloon:not([hidden]){animation:pop .14s var(--eo)}
#hud{transition:opacity .12s ease}#hud.off{opacity:0}
.ideas.fresh .idea{animation:pop .24s var(--eo) both}
.ideas.fresh .idea:nth-child(2){animation-delay:.04s}.ideas.fresh .idea:nth-child(3){animation-delay:.08s}.ideas.fresh .idea:nth-child(4){animation-delay:.12s}
#chk{animation:pop .22s var(--eo)}
@media (hover:hover) and (pointer:fine){
 .slot:hover .pv,.pt:not(:disabled):hover .pv canvas{transform:scale(1.06)}
 .tool:not(:disabled):hover svg{transform:translateY(-2px)}
 .tool:not(:disabled):active svg{transform:translateY(2px)}
}
body.calm *,body.calm *::before,body.calm *::after{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){#art.ants::after{animation:none}}

@media (max-width:1180px) and (min-width:900px){#desk{grid-template-columns:84px minmax(0,1fr) 440px}}
@media (min-width:900px){#tabs [data-t=ideas],.ph{display:none}}
@media (max-width:899px){
 body{grid-template-rows:44px minmax(0,1fr)}
 #menubar{border-radius:0;padding:0 2px}#brand{padding:0 6px 0 6px}#brand canvas{height:10px}
 .mb>button{padding:0 8px}.menu{max-height:calc(100dvh - 44px);overflow:auto}
 #helpT{height:44px;min-width:44px;margin-right:2px;border-radius:0;background:none;border:0;padding:0}#helpT b{display:grid;place-items:center;width:40px;height:28px;border:2px solid #000;border-radius:0;background:var(--ye);margin:auto}#helpT[aria-pressed=true]{background:none;color:#000}#helpT[aria-pressed=true] b{background:#000;color:#fff}#helpT .lg{display:none}
 #desk{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"pic" "tools" "ctl";gap:6px;padding:6px}
 #wIdeas{display:none}
 .win{box-shadow:2px 2px 0 #000}
 #wPic .tb{height:20px;background-position:6px 3px}#wPic .tb .tt{font-size:16px}
 #box{flex:none;height:clamp(150px,31dvh,310px);margin:4px}
 #foot{gap:8px;padding:5px 8px;min-height:0}
 .scrub{flex:1 1 0;min-height:44px}#fPlay{width:48px;height:44px}
 #foot{padding:2px 8px}
 .hex,input[type=color]{height:44px}
 .menu button{padding:14px 16px}
 #picFix{font-size:14px;padding:5px 9px 4px}#picFix::after{inset:-4px -8px -16px -4px}#enl{font-size:14px}
 #foot{position:relative;overflow:hidden}
 #note{position:absolute;inset:0;inset-inline-start:48px;z-index:6;background:var(--ye);padding:5px 10px 0;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;transition:opacity .18s ease,transform .22s var(--eo)}
 #note.idle{opacity:0;transform:translateY(100%);pointer-events:none}
 body.touched #enl{display:none}
 .ideas{grid-template-columns:repeat(2,1fr)}.idea .pv{height:100px}.idea .lb{min-height:0}
 #empty{gap:6px;padding:8px}#empty h2{font-size:22px}#empty p{font-size:14px;line-height:1.3;padding:3px 8px}
 #hud{font-size:20px}
 #tools{grid-template-columns:repeat(7,1fr);align-self:stretch;box-shadow:2px 2px 0 #000}
 .tool{min-height:48px;padding:5px 0 3px;gap:2px;font-size:13px}.tool svg{width:20px;height:20px}
 .tool.dk,.tool.nm{display:none}
 #tools{grid-template-columns:repeat(6,1fr)}
 body:not(.help) .intro:not(.sub){display:none}
 #wCtl .tb{display:none}
 .slot{min-height:46px;grid-template-columns:44px 1fr;gap:6px;padding:3px 6px}.slot .pv{width:44px;height:34px}
 #tabs button{min-height:44px}#tabs .pxf{font-size:18px}
 .fxg{grid-template-columns:repeat(2,1fr)}.pt{grid-template-rows:92px auto}
 .tiles{grid-template-columns:repeat(3,1fr)}
 .pres{grid-template-columns:repeat(3,1fr)}.pres button{min-height:44px}
 .btn{min-height:44px}.btn.sm{min-height:44px;padding:0 12px}
 .keys button{min-width:44px;height:44px}.lines button{height:44px}
 .sl{min-height:44px}
 #balloon{display:none}
 dialog{margin-top:10px}
 body.kb #wPic,body.kb #tools{display:none}
}
@media (max-width:899px) and (max-height:700px){
 #box{height:clamp(110px,25dvh,190px)}
 #enl{display:none}
 #empty p{display:none}#empty h2{font-size:20px}#empty .btn.sm{min-height:40px;padding:0 9px;font-size:13px}
 .tool{min-height:44px;padding:3px 0 2px}
 .slot{min-height:40px}.slot .pv{height:30px}.slot .nm small{display:none}
 body:not(.help) .intro:not(.sub){display:none}
}
@media (max-width:899px) and (max-height:520px) and (orientation:landscape){
 #desk{grid-template-columns:minmax(0,44%) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"pic ctl" "tools ctl"}
 #box{flex:1;height:auto}
 .tool span{display:none}.tool{min-height:44px}
 .fxg{grid-template-columns:repeat(3,1fr)}
 dialog{width:min(620px,calc(100vw - 20px));margin-top:6px;max-height:calc(100dvh - 12px)}
 .db{padding:8px 14px 4px;gap:6px}.da{padding:6px 10px 8px}
 #empty p{display:none}
}
@media (max-width:899px) and (max-height:600px) and (orientation:portrait){#box{height:clamp(100px,21dvh,140px)}}
@media (max-width:520px){.cells{grid-template-columns:minmax(0,1fr)}.bd.all{min-width:52px}.bands{gap:4px}.chip,.bd{width:44px;height:44px}#tabs .pxf{font-size:14px;letter-spacing:0}#tabs button{flex:1 1 auto;padding:0 4px}}
@media (max-width:350px){.slot .nm b{font-size:14px}.slot{gap:4px;padding:3px 4px}.tool{font-size:13px;letter-spacing:-.02em}.tool svg{width:18px;height:18px}#tabs .pxf{font-size:12px}.mb>button{padding:0 6px}}

/* pixel corners: stepped 2px corners in place of rounded ones */
:root{--pxc:polygon(4px 0,calc(100% - 4px) 0,calc(100% - 4px) 2px,calc(100% - 2px) 2px,calc(100% - 2px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 2px) calc(100% - 4px),calc(100% - 2px) calc(100% - 2px),calc(100% - 4px) calc(100% - 2px),calc(100% - 4px) 100%,4px 100%,4px calc(100% - 2px),2px calc(100% - 2px),2px calc(100% - 4px),0 calc(100% - 4px),0 4px,2px 4px,2px 2px,4px 2px)}
.btn,#helpT,#helpT b,#fPlay,.hp,.sl .th,.rad i{border-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='1'/%3E%3Crect x='2' y='5' width='2' height='1'/%3E%3Crect x='0' y='2' width='1' height='2'/%3E%3Crect x='5' y='2' width='1' height='2'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='4' y='1' width='1' height='1'/%3E%3Crect x='1' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3C/svg%3E") 2 / 4px stretch;clip-path:var(--pxc)}
.rad.on i::after{clip-path:polygon(2px 0,calc(100% - 2px) 0,calc(100% - 2px) 2px,100% 2px,100% calc(100% - 2px),calc(100% - 2px) calc(100% - 2px),calc(100% - 2px) 100%,2px 100%,2px calc(100% - 2px),0 calc(100% - 2px),0 2px,2px 2px)}
.btn:focus-visible,#helpT:focus-visible,#fPlay:focus-visible{outline:2px solid #000;outline-offset:-6px;box-shadow:inset 0 0 0 4px #fff}
.btn.df{box-shadow:none;margin:0 0 0 6px;border-width:4px;border-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='2'/%3E%3Crect x='2' y='4' width='2' height='2'/%3E%3Crect x='0' y='2' width='2' height='2'/%3E%3Crect x='4' y='2' width='2' height='2'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='4' y='1' width='1' height='1'/%3E%3Crect x='1' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3C/svg%3E") 2 / 4px stretch;min-height:40px}
.btn.df:focus-visible{box-shadow:inset 0 0 0 2px #fff}
.keys{clip-path:var(--pxc)}
.hd.hd{font-size:13px;letter-spacing:-.02em;white-space:normal;line-height:1.15;display:flex;align-items:center;min-height:42px}
.idea .lb{font-size:13px;letter-spacing:0}
@media (max-width:350px){.slot .nm b{font-size:12px;letter-spacing:0}}
@media (max-width:899px){#helpT{border-image:none;clip-path:none}}
#tabs button{flex:1 1 auto}
@media (max-width:1180px) and (min-width:900px){#tabs .pxf{font-size:18px}}
.hex.hex{font-family:'PLNum',var(--px)}

/* compare the source with the shape read from it */
.cmp{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px}
.cmp figure{margin:0;border:2px solid #000;background:#fff;display:grid;grid-template-rows:1fr auto}
.cmp canvas{width:100%;height:150px;object-fit:contain;image-rendering:pixelated;display:block;padding:6px}
.cmp figure:first-child canvas{image-rendering:auto}
.cmp figcaption{border-top:2px solid #000;padding:3px 6px;font-size:13px;background:var(--ye)}
#noteAct{flex:none;align-self:center;margin-left:8px}
#noteAct[hidden]{display:none}
@media (max-width:899px){#foot.act #note{padding-inline-end:118px}#noteAct{position:absolute;inset-inline-end:6px;bottom:5px;z-index:7;min-height:30px;margin:0}.cmp canvas{height:110px}}
@media (max-width:899px){body.t-ideas #slots{display:none}}
@media (max-width:350px){#note{font-size:13px}#foot.act #note{padding-inline-end:104px}#noteAct{padding:0 8px}}

/* ---------- phone, portrait: the picture is the hero (2026-12-02) ----------
   The page scrolls as a whole. Menu, picture and tool keys stay pinned at the top;
   the slots, tabs and panel scroll under them. The picture box takes about 45% of
   whatever height the browser (or a frame around the page) gives us. */
@media (max-width:899px) and (orientation:portrait){
 html,body{height:auto}
 body{display:block;height:auto;min-height:100dvh;overflow-x:hidden;overflow-y:auto}
 #menubar{position:sticky;top:0;z-index:40;height:40px}
 #desk{display:flex;flex-direction:column;gap:6px;padding:0 6px 10px;min-height:0}
 #wPic,#tools{position:sticky;z-index:30}
 #wPic{order:1}#tools{order:2}#wCtl{order:3}#wIdeas{order:4}
 #wPic{top:40px;margin-top:6px;box-shadow:none;animation:none}
 #wPic::before{content:"";position:absolute;left:-8px;right:-8px;top:-8px;height:8px;background:var(--scales) var(--desk)}
 #tools{top:calc(40px + var(--sh,300px));box-shadow:none;animation:none;margin-top:-6px;border-top:0}
 #tools::after{content:"";position:absolute;left:-8px;right:-8px;bottom:-8px;height:8px;background:var(--scales) var(--desk);pointer-events:none}
 #box{flex:none;height:clamp(150px,calc(46dvh - 96px),min(78vw,380px));margin:2px 4px}
 #wPic .tb{height:18px}#wPic .tb .tt{font-size:15px}
 #picFix{font-size:12px;padding:3px 7px 2px}
 #enl{display:none}
 #foot{min-height:40px}#fPlay{width:44px;height:40px}.scrub{min-height:40px}
 .tool{min-height:42px;padding:3px 0 2px;font-size:12px;gap:1px}.tool svg{width:18px;height:18px}
 #wCtl{flex:none;animation:none;overflow:visible}
 #panel{flex:none;overflow:visible}
 #tabs{position:sticky;top:calc(40px + var(--sh,300px) + var(--th,48px) + 2px);z-index:25}
 #tabs button{min-height:40px}
 .slot{min-height:40px}.slot .pv{height:30px}.slot .nm small{display:none}
}
@media (max-width:899px) and (orientation:portrait) and (max-height:620px){
 #box{height:clamp(140px,calc(50dvh - 100px),min(78vw,320px))}
 #wPic .tb{display:none}
}
@media (max-width:899px) and (orientation:portrait) and (max-height:620px){
 #tools{position:relative;top:auto;margin-top:0;border-top:2px solid #000;z-index:1}
 #tools::after{display:none}
 #tabs{top:calc(40px + var(--sh,240px) + 2px)}
 #box{height:clamp(150px,calc(56dvh - 104px),min(78vw,320px))}
 #foot{min-height:38px}#fPlay{height:38px}.scrub{min-height:38px}
}
@media (max-width:899px) and (orientation:portrait){
 #picFix{min-height:32px;font-size:13px}
 #tabs{margin-top:0}
}

/* ---------- Hebrew (right to left) ---------- */
#langT{align-self:center;height:24px;margin-inline-end:8px;border:2px solid #000;background:#fff;padding:0 8px;font:15px/1 var(--px);white-space:nowrap;clip-path:var(--pxc)}
@media (max-width:899px){#langT{height:30px;padding:0 6px;font-size:14px;margin-inline-end:4px}}
[dir=rtl] .sl,[dir=rtl] .ends,[dir=rtl] .scrub,[dir=rtl] .dial,[dir=rtl] .hex,[dir=rtl] #art{direction:ltr}
[dir=rtl] .ends span:first-child{text-align:left}[dir=rtl] .ends span:last-child{text-align:right}
body.he{letter-spacing:0}
[dir=rtl] .menu{left:auto;right:0;box-shadow:-3px 3px 0 #000}
[dir=rtl] .tb .cb{left:auto;right:10px}
body.he .pt.used .lb::after{content:"בשימוש"}
body.he.dragging #box::after{content:"לשחרר כאן"}
body.he.loading #box::after{content:"קורא את התמונה"}

.parts{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.parts b{display:block;width:24px;height:24px;border:2px solid #000;clip-path:var(--pxc)}
.heMark{display:none;font:22px/1 var(--px);white-space:nowrap}body.he #brand canvas{display:none}body.he .heMark{display:block}
@media (max-width:899px){.heMark{font-size:16px}}
@media (max-width:399px){body.he .mb>button{padding-left:5px;padding-right:5px}body.he .heMark{font-size:15px}body.he #brand{padding:0 4px}body.he #langT{padding:0 4px;margin-inline-end:2px}}
