/* Evidence · 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;--band:rgba(0,0,0,.05);--scrim:rgba(255,255,255,.84)}
html[data-theme=dark]{color-scheme:dark;--bg:#000;--ink:#fff;--text:#ededed;--sub:#a6a6a6;--line:#2f2f2f;--frame:#ededed;--band:rgba(255,255,255,.06);--scrim:rgba(0,0,0,.8)}
@media(prefers-color-scheme:dark){html:not([data-theme=light]){color-scheme:dark;--bg:#000;--ink:#fff;--text:#ededed;--sub:#a6a6a6;--line:#2f2f2f;--frame:#ededed;--band:rgba(255,255,255,.06);--scrim:rgba(0,0,0,.8)}}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);touch-action:manipulation}
body{height:100svh;display:grid;grid-template-rows:56px minmax(0,1fr) 92px;font:16px/1.45 "Plex Sans",sans-serif;overflow:hidden;-webkit-tap-highlight-color:transparent}
button,select{font:inherit;color:inherit}button{touch-action:manipulation;cursor:pointer}
header{display:flex;align-items:center;justify-content:center;padding:4px 16px;position:relative}header .ib{position:absolute;left:8px}
#readout{font:500 13px/1 "Plex Mono",monospace;color:var(--sub);letter-spacing:.02em;font-variant-numeric:tabular-nums}
main{position:relative;min-height:0;min-width:0;overflow:hidden;padding:4px 12px}
#stage{position:relative;width:100%;height:100%;display:grid;place-items:center}
#board{position:relative;flex:none;color:var(--ink);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#rig{position:absolute;inset:0;width:100%;height:100%;overflow:visible;fill:none;stroke:var(--ink);stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#rig .beam,#rig .hang{transition:transform .3s cubic-bezier(.3,.7,.2,1)}
#rig .beam{transform-box:view-box}
#rig .foot{fill:var(--ink);stroke:none}#rig .string{stroke:var(--guide);stroke-width:1}#rig .bowl{stroke-width:1.5}#rig .home{stroke:var(--line);stroke-dasharray:2 3}
/* Pans, tray: wide quiet targets. They outline only while a stone is picked. */
.pan,#tray{position:absolute;border:0;background:none;padding:0;color:inherit;transition:transform .3s cubic-bezier(.3,.7,.2,1)}
#tray{border-top:1px solid var(--line)}
#board.picking .pan,#board.picking #tray{outline:1px dashed var(--guide);outline-offset:-3px}
.pan:focus-visible,#tray:focus-visible{outline:2px solid var(--ink)!important;outline-offset:-2px!important}
.pan.full{opacity:1}
.spot{position:absolute;width:48px;height:48px;border:0;background:none;padding:0;display:grid;place-items:center;color:var(--ink);border-radius:50%}
.spot svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.spot[aria-disabled=true]{color:var(--guide)}
.spot:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.spot:active:not([aria-disabled=true]){transform:scale(.94)}
#scale.ready svg .fill{fill:currentColor}
#verdict svg .dot{fill:currentColor;stroke:none}
/* The mark row: one slot per allowed weighing; a used slot draws its result. */
#marks{position:absolute;display:flex;justify-content:center;gap:10px;height:40px;align-items:center}
#marks svg{width:55px;height:40px;fill:none;stroke:var(--ink);stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
#marks svg.open{stroke:var(--guide);stroke-dasharray:2 3}
#marks svg circle{fill:var(--ink);stroke:none}
/* Stones. Possible: solid. Ruled out: hollow, dashed rim and a strike. Picked: lifted with a ring. Found: ring and dot. */
.stone{position:absolute;left:0;top:0;width:44px;height:44px;padding:0;border:0;background:none;display:grid;place-items:center;color:var(--ink);z-index:2;transition:transform .3s cubic-bezier(.3,.7,.2,1),color .15s}
.stone::before{content:'';width:26px;height:26px;border-radius:50%;border:1.5px solid currentColor;background:currentColor;box-sizing:border-box}
.stone::after{content:'';position:absolute;width:0;height:1.5px;background:currentColor;transform:rotate(-45deg)}
.stone.out{color:var(--sub)}.stone.out::before{background:var(--bg);border-style:dashed}.stone.out::after{width:34px}
.stone.picked::before{box-shadow:0 0 0 4px var(--bg),0 0 0 5.5px var(--ink)}
.stone.found::before{background:var(--bg);border-width:2px;box-shadow:0 0 0 4px var(--bg),0 0 0 5.5px var(--ink)}
.stone.found::after{width:8px;height:8px;border-radius:50%;transform:none}
.stone.hinted::before{outline:1.5px dashed var(--ink);outline-offset:6px}
.stone:focus-visible{outline:2px solid var(--ink);outline-offset:-1px;border-radius:50%}
#ghosts{position:absolute;inset:0;pointer-events:none}
.ghost{position:absolute;width:44px;height:44px;display:grid;place-items:center}.ghost::before{content:'';width:26px;height:26px;border-radius:50%;border:1.5px dashed var(--ink)}
#strip{position:fixed;left:16px;right:16px;bottom:calc(max(6px,env(safe-area-inset-bottom)) + 56px);margin:0;text-align:center;color:var(--sub);font:14px/1.3 "Plex Sans",sans-serif;pointer-events:none;min-height:18px}
.ib{height:48px;width:48px;border:0;background:none;padding:12px;color:var(--ink)}
.ib svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.ib:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.ib:disabled{opacity:.4;cursor:default}
.toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;gap:8px}.toolbar>div{display:flex;gap:4px}
#next-btn{background:var(--ink);color:var(--bg);border-radius:50%}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.sheet{color:var(--text);background:var(--bg);width:min(32rem,calc(100vw - 16px));max-height:calc(100svh - 16px);padding:0;border:1px solid var(--frame);border-radius:0;overflow:auto}.sheet::backdrop{background:var(--scrim)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 10px 4px 24px;border-bottom:1px solid var(--line)}
h2{font:500 16px/1 "Plex Mono",monospace;margin:0}h3{font:500 14px/1.3 "Plex Mono",monospace;color:var(--sub);margin:20px 0 8px}.sheet-body{padding:20px 24px}.sheet p{margin:0 0 12px;max-width:60ch}
.row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;border-bottom:1px solid var(--line)}select{padding:6px 12px;max-width:70%;min-height:44px;background:var(--bg);border:0}
.sheet footer{padding:12px 24px;border-top:1px solid var(--line);font-size:14px;color:var(--sub)}a{color:inherit}.note{color:var(--sub);font-size:14px}
#catalog{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
#catalog button{width:100%;min-height:44px;border:1px solid var(--line);border-radius:0;background:none;padding:8px;font:500 14px "Plex Mono",monospace}#catalog button[aria-current]{outline:2px solid var(--ink);outline-offset:1px}#catalog .finished::after{content:' ✓'}
@media(max-height:520px) and (min-width:560px){body{grid-template-columns:56px minmax(0,1fr) 80px;grid-template-rows:100svh}header{writing-mode:vertical-rl}header .ib{position:static}main{padding:8px}#strip{bottom:8px;right:80px}}
html[data-motion=reduce] *,html[data-motion=reduce] *::before,html[data-motion=reduce] *::after{transition:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
@media(forced-colors:active){:root,html[data-theme]{--bg:Canvas;--ink:CanvasText;--text:CanvasText;--sub:GrayText;--line:GrayText;--guide:GrayText;--frame:CanvasText}.stone,.ghost,#marks,#rig{forced-color-adjust:none}.stone:focus-visible,.spot:focus-visible{outline-color:Highlight}}
