/* Horologist. 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:#d4d4d4;--guide:#8f8f8f;--frame:#1c1c1c;--scrim:rgba(255,255,255,.84);--metal:#eee;--edge:#8c8c8c;--loose:#f5f5f5;--loose-edge:#444;--outline:#737373;--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:#2f2f2f;--frame:#ededed;--scrim:rgba(0,0,0,.8);--metal:#222;--edge:#707070;--loose:#111;--loose-edge:#bbb;--outline:#8c8c8c}}
:root[data-theme=dark]{color-scheme:dark;--bg:#000;--ink:#fff;--text:#ededed;--sub:#a6a6a6;--line:#2f2f2f;--frame:#ededed;--scrim:rgba(0,0,0,.8);--metal:#222;--edge:#707070;--loose:#111;--loose-edge:#bbb;--outline:#8c8c8c}
*{box-sizing:border-box;border-radius:0}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,a: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(18px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);font:500 13px/1 var(--mono);letter-spacing:.02em;color:var(--sub);font-variant-numeric:tabular-nums;white-space:nowrap}#restart-btn{position:fixed;left:8px;top:max(0px,env(safe-area-inset-top));z-index:2}
#board{position:absolute;inset:52px 12px 66px;user-select:none;overscroll-behavior:none}#works{display:block;width:100%;height:100%;overflow:visible}#targets{position:absolute;inset:0;pointer-events:none}.piece-target{position:absolute;min-width:44px;min-height:44px;padding:0;border:0;background:transparent;pointer-events:auto;transform:translate(-50%,-50%);border-radius:50%;color:var(--ink)}.piece-target:focus-visible{outline:2px solid var(--ink);outline-offset:4px}#next-btn{position:absolute;right:0;top:0}#next-btn[hidden]{display:none}
.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)}
.sheet{width:min(32rem,calc(100vw - 16px));max-height:calc(100dvh - 16px);border:1px solid var(--frame);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{margin:0;font:500 16px/1.3 var(--mono)}.sheet-head form{margin:0}.sheet-x{width:44px;height:44px;min-width:44px;min-height:44px;font:28px/1 var(--sans)}.sheet-body{padding:20px 24px;overflow:auto;min-height:0}.sheet-body p{max-width:60ch;margin:0 0 16px}.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}.row button{min-height:44px;background:none;border:0;padding:8px}.row button:not(:disabled){text-decoration:underline;text-underline-offset:4px}.sheet-foot{padding:12px 24px;border-top:1px solid var(--line);flex:none;color:var(--sub);font-size:14px}.sheet-foot a{color:inherit}
.gear-face{fill:var(--metal);stroke:var(--edge);stroke-width:1}.spoke{stroke:var(--edge);stroke-width:1.5;fill:none}.loose .gear-face{fill:var(--loose);stroke:var(--loose-edge);stroke-width:1.5}.loose .spoke{stroke:var(--loose-edge);stroke-width:2}.pinion .gear-face{fill:var(--bg);stroke-width:1.5}.arbor{fill:var(--bg);stroke:var(--sub);stroke-width:1.5}.dial-ring,.dial-tick{fill:none;stroke:var(--sub);stroke-width:1}.hand-halo{fill:var(--bg);stroke:var(--bg);stroke-width:4;stroke-linejoin:round}.hand-outline{fill:none;stroke:var(--outline);stroke-width:2;stroke-linejoin:round}.hand-solid{fill:var(--ink);stroke:var(--bg);stroke-width:1;stroke-linejoin:round}.dial-sign{stroke:var(--ink);stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}.rail{stroke:var(--line);stroke-width:1;fill:none}.rule{stroke:var(--guide);stroke-width:1;fill:none}.socket{fill:none;stroke:var(--line);stroke-width:1;stroke-dasharray:2 5}.selection,.obstacle{fill:none;stroke:var(--ink);stroke-width:2}.preview{opacity:.35}.removing{opacity:.28}.end-pulse{fill:none;stroke:var(--ink);stroke-width:2}
@media(orientation:landscape) and (max-height:500px){#board{inset:46px 76px 12px 12px}.toolbar{left:auto;right:8px;top:12px;bottom:12px;flex-direction:column;width:48px}.toolbar>div{flex-direction:column}.readout{left:calc(50% - 32px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}:root[data-motion=reduce] *{animation:none!important;transition:none!important}
