/* Catch the Monkey · Minimal. By 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:#000;--text:#111;--sub:#5e5e5e;--line:#8c8c8c;--closed:#cdcdcd;--rim:#2e2e2e;--scrim:rgba(255,255,255,.84);--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:#fff;--text:#ededed;--sub:#a6a6a6;--line:#7a7a7a;--closed:#3b3b3b;--rim:#e2e2e2;--scrim:rgba(0,0,0,.8)}}
:root[data-theme=dark]{color-scheme:dark;--bg:#000;--ink:#fff;--text:#ededed;--sub:#a6a6a6;--line:#7a7a7a;--closed:#3b3b3b;--rim:#e2e2e2;--scrim:rgba(0,0,0,.8)}
*{box-sizing:border-box;border-radius:0}html,body{touch-action:manipulation}body{margin:0;height:100dvh;overflow:hidden;background:var(--bg);color:var(--text);font:16px/1.45 var(--sans);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,select:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.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);letter-spacing:.02em;color:var(--sub);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:center}.readout span{margin-left:24px}
#restart-btn{position:fixed;top:max(0px,env(safe-area-inset-top));left:8px;color:var(--sub);z-index:2}#restart-btn:hover,#restart-btn:focus-visible{color:var(--ink)}
#board-shell{position:absolute;inset:max(52px,env(safe-area-inset-top)) 8px max(58px,env(safe-area-inset-bottom));display:grid;place-items:center;touch-action:none}#stage{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}#board{display:block;flex:none;overflow:visible;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;outline:none}#completion{height:48px;min-height:48px;display:flex;justify-content:center;align-items:center;width:100%}
.cell{fill:var(--bg);stroke:var(--line);stroke-width:1;vector-effect:non-scaling-stroke}.cell.closed{fill:var(--closed);stroke:var(--closed)}.rim-mark{fill:none;stroke:var(--rim);stroke-width:1.6;vector-effect:non-scaling-stroke}.route{fill:none;stroke:var(--ink);stroke-opacity:.24;stroke-width:2;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.next-dot{fill:var(--ink)}.hover-ring,.focus-ring,.hint-ring{fill:none;stroke:var(--ink);stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.hint-ring{stroke-dasharray:4 3}.focus-ring{stroke-width:3}.monkey-ink{fill:var(--ink)}.monkey-face{fill:var(--bg)}.tail{fill:none;stroke:var(--ink);stroke-width:.075;stroke-linecap:round}.catch-ring{fill:none;stroke:var(--ink);stroke-width:1.5;vector-effect:non-scaling-stroke}.board-hit{fill:transparent;stroke:none}#board[data-caught=true] .route{opacity:0}
.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:none;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:active{transform:scale(.94)}.ib[hidden]{display:none}
.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;flex:none;border-bottom:1px solid var(--line)}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}.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}
@media(orientation:landscape) and (max-height:500px){#board-shell{inset:38px 72px 6px 56px}.toolbar{left:auto;right:8px;top:8px;bottom:8px;flex-direction:column;width:48px}.toolbar>div{flex-direction:column}.readout{left:calc(50% - 8px)}#completion{height:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}:root[data-motion=reduce] *{animation:none!important;transition:none!important}
@media(forced-colors:active){:root{--bg:Canvas;--ink:CanvasText;--text:CanvasText;--closed:GrayText;--line:GrayText;--rim:CanvasText}.route{stroke-opacity:1;stroke-dasharray:3 3}}
.lost-ring,.lost-mark{fill:none;stroke:var(--ink);stroke-width:2;vector-effect:non-scaling-stroke}.lost-ring{stroke-dasharray:4 3}#board[data-lost=true] .route{stroke-dasharray:4 3}#retry-btn{outline:1px solid var(--ink);outline-offset:-7px}
