/* Even. Luke Steuber. */
@font-face{font-family:"Plex Mono";src:url("./fonts/IBMPlexMono-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Plex Sans";src:url("./fonts/IBMPlexSans-400.woff2") format("woff2");font-weight:400;font-display:swap}
:root{color-scheme:light;--bg:#fff;--ink:#141414;--text:#181818;--sub:#626262;--line:#b7b7b7;--wash:#efefef;--scrim:#ffffffdc;--mono:"Plex Mono",monospace;--sans:"Plex Sans",sans-serif}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark;--bg:#000;--ink:#f2f2f2;--text:#ededed;--sub:#aaa;--line:#565656;--wash:#202020;--scrim:#000000dc}}
:root[data-theme=dark]{color-scheme:dark;--bg:#000;--ink:#f2f2f2;--text:#ededed;--sub:#aaa;--line:#565656;--wash:#202020;--scrim:#000000dc}
*{box-sizing:border-box}body{margin:0;min-height:100dvh;height:100dvh;overflow:hidden;background:var(--bg);color:var(--text);font:16px/1.5 var(--sans);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.36;cursor:default}button:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--ink);outline-offset:3px}button[hidden],[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.readout{position:fixed;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);font:500 13px/1.4 var(--mono);white-space:nowrap;color:var(--sub)}#restart-btn{position:fixed;top:0;left:8px;z-index:2}
#board-shell{position:absolute;inset:max(56px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(128px,calc(env(safe-area-inset-bottom) + 128px)) max(12px,env(safe-area-inset-left));display:grid;place-items:center;min-height:0}#stage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;width:min(100%,520px);max-height:100%;min-height:0}#scene-wrap{width:min(100%,420px,calc(100dvh - 290px));flex:none}#board{position:relative;width:100%;aspect-ratio:1;outline:none;touch-action:pinch-zoom}#board:focus-visible{outline:1px dashed var(--sub);outline-offset:5px}#scene-canvas{display:block;width:100%;height:100%;image-rendering:auto}#patches,#measurements{position:absolute;inset:0;pointer-events:none}.patch{position:absolute;padding:0;margin:0;border:0;background:transparent;min-width:44px;min-height:44px;pointer-events:auto;appearance:none;outline:none}.patch::before{content:"";position:absolute;inset:6%;background:linear-gradient(#fff,#fff) left top/14% 1px no-repeat,linear-gradient(#fff,#fff) left top/1px 14% no-repeat,linear-gradient(#fff,#fff) right top/14% 1px no-repeat,linear-gradient(#fff,#fff) right top/1px 14% no-repeat,linear-gradient(#fff,#fff) left bottom/14% 1px no-repeat,linear-gradient(#fff,#fff) left bottom/1px 14% no-repeat,linear-gradient(#fff,#fff) right bottom/14% 1px no-repeat,linear-gradient(#fff,#fff) right bottom/1px 14% no-repeat;filter:drop-shadow(0 1px #000);pointer-events:none}.patch[data-selected=true]::before{background-size:18% 2px,2px 18%,18% 2px,2px 18%,18% 2px,2px 18%,18% 2px,2px 18%;inset:3%}.patch:focus-visible{outline:2px solid #fff;outline-offset:-3px;box-shadow:inset 0 0 0 5px #111}.patch[data-hint=true]{outline:2px dashed #fff;outline-offset:-7px}.patch:disabled{opacity:1;cursor:default}.patch:disabled::before{opacity:.6}#reference-mark{position:absolute;pointer-events:none;color:#fff;filter:drop-shadow(0 1px #000)}#reference-mark svg{position:absolute;left:8%;top:8%;width:18px;height:18px;stroke:currentColor;stroke-width:1.5;fill:none}.measurement{position:absolute;display:flex;justify-content:center;align-items:flex-end;transform:translateY(6px);font:500 12px/1.2 var(--mono);color:var(--ink);pointer-events:none}.measurement.reference::after{content:" · ◉"}
#palette{display:grid;grid-template-columns:repeat(5,48px);gap:10px;flex:none}#palette button{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border:1px solid #222;position:relative;appearance:none;forced-color-adjust:none}#palette button[aria-pressed=true]::after{content:"";position:absolute;inset:4px;border:2px solid #fff;outline:1px solid #111;pointer-events:none}#palette button:focus-visible{outline:2px solid var(--ink);outline-offset:4px}#palette button[data-hint=true]{outline:2px dashed var(--ink);outline-offset:4px}#palette button:disabled{opacity:1;cursor:default}#hint-note{font:500 12px/1.4 var(--mono);color:var(--sub);text-align:center;max-width:100%}
.toolbar{position:fixed;bottom:max(6px,env(safe-area-inset-bottom));left:8px;right:8px;display:flex;justify-content:space-between}.toolbar>div{display:flex}.ib{display:inline-grid;place-items:center;width:48px;height:48px;min-width:48px;min-height:48px;border:0;background:transparent;padding:12px;color:var(--ink)}.ib svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.ib[aria-pressed=true]{outline:1px solid currentColor;outline-offset:-6px}.sheet{width:min(32rem,calc(100vw - 16px));max-height:calc(100dvh - 16px);border:1px solid var(--ink);padding:0;background:var(--bg);color:var(--text)}.sheet[open]{display:flex;flex-direction:column}.sheet::backdrop{background:var(--scrim)}.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:8px 16px;gap:12px;border-bottom:1px solid var(--line);flex:none}.sheet-head h2{font:500 16px/1.3 var(--mono);margin:0}.sheet-head form{margin:0}.sheet-x{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px}.sheet-body{padding:20px 24px;overflow:auto;min-height:0;overscroll-behavior:contain}.sheet-body p{margin:0 0 16px}.sheet-body p:last-child{margin-bottom:0}.sheet-body summary{padding:12px 0;min-height:44px;cursor:pointer}.sheet-body details p{margin-top:12px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;border-bottom:1px solid var(--line)}.row select{max-width:65%;min-height:44px;background:var(--bg);border:0;padding:4px 8px}.sheet-foot{padding:12px 24px;border-top:1px solid var(--line);flex:none;color:var(--sub);font-size:14px}.sheet-foot a{color:inherit;text-underline-offset:3px}.group{font:500 15px var(--mono);margin:20px 0 12px}.group:first-child{margin-top:0}.campaign-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;list-style:none;padding:0;margin:0}.campaign-catalog button{width:100%;min-height:56px;padding:8px;border:1px solid var(--line);background:var(--bg);text-align:left}.campaign-catalog button span{display:block}.catalog-state{font-size:12px;color:var(--sub)}.campaign-catalog button[aria-current]{border:2px solid var(--ink);padding:7px}#end-line{position:fixed;left:var(--control-next-left,50%);bottom:calc(var(--control-next-bottom,64px) + 80px);transform:translateX(-50%);font:500 13px var(--mono);white-space:nowrap}
@media(max-width:359px){#board-shell{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}#stage{gap:16px}#palette{gap:8px}}
@media(max-height:620px) and (orientation:portrait){#board-shell{inset:48px max(12px,env(safe-area-inset-right)) 112px max(12px,env(safe-area-inset-left))}#scene-wrap{width:min(100%,calc(100dvh - 270px))}#stage{gap:14px}}
@media(max-height:520px) and (min-width:560px){#board-shell{inset:42px max(152px,calc(env(safe-area-inset-right) + 144px)) 12px max(60px,env(safe-area-inset-left))}#stage{flex-direction:row;width:100%;height:100%;gap:28px}#scene-wrap{width:min(calc(100dvh - 70px),calc(100% - 88px));max-height:100%;aspect-ratio:1}#palette{grid-template-columns:48px;gap:8px}#hint-note{position:absolute;bottom:0;left:0;right:0;max-width:none}.toolbar{left:auto;right:8px;top:8px;bottom:8px;flex-direction:column;width:48px}.toolbar>div{flex-direction:column}#end-line{font-size:12px;max-width:84px;white-space:normal;text-align:center}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}:root[data-motion=reduce] *, :root[data-motion=reduce] *::after{animation:none!important;transition:none!important}
@media(forced-colors:active){:root{--bg:Canvas;--ink:CanvasText;--text:CanvasText;--sub:CanvasText;--line:GrayText;--wash:Canvas;--scrim:Canvas}.patch::before{forced-color-adjust:none}.patch:focus-visible{outline-color:Highlight}.measurement{background:Canvas}.patch[data-selected=true]{outline:2px solid Highlight;outline-offset:1px}}
