/* Black Cube. Paper ground, one black object, ink marks. 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:#f5f1ea;--ink:#262523;--text:#262523;--sub:#5e5a54;--line:#cfcac0;--guide:#8d8a84;--band:rgba(38,37,35,.06);--lit:#fff7e2;--page:#f2f1ed;--cube:#111110;--accent:#d2451e;--mono:"Plex Mono",monospace;--sans:"Plex Sans",system-ui,sans-serif}
*{box-sizing:border-box;border-radius:0}
html,body{touch-action:manipulation;overscroll-behavior:none}
body{margin:0;height:100dvh;overflow:hidden;background:var(--page);color:var(--text);font:16px/1.45 var(--sans);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;transition:background-color .25s}
button{font:inherit;color:inherit;cursor:pointer}
: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}
.ib{width:48px;height:48px;display:inline-grid;place-items:center;background:none;border:0;padding:0;color:var(--ink)}
.ib svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ib[hidden]{display:none}
.ib:disabled{opacity:.35}
.top{position:fixed;top:max(0px,env(safe-area-inset-top));left:8px;z-index:3;height:52px}
#stage{position:absolute;inset:calc(max(0px,env(safe-area-inset-top)) + 52px) 12px calc(max(0px,env(safe-area-inset-bottom)) + 76px)}
#cube-view{position:fixed;inset:0}
#scene{display:block;width:100%;height:100%;outline:none;touch-action:none}
#scene:focus-visible{outline:2px dashed var(--ink);outline-offset:-6px}
#panel-view{position:absolute;inset:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}
#cube-view[hidden],#panel-view[hidden]{display:none}
#panel-board{display:flex;align-items:center;justify-content:center;max-width:100%;background:var(--bg);padding:20px}
#panel-board svg{display:block;overflow:visible;touch-action:none}
.panel-readout{position:fixed;top:calc(max(0px,env(safe-area-inset-top)) + 18px);left:50%;transform:translateX(-50%);font:500 13px/1 var(--mono);color:var(--sub);font-variant-numeric:tabular-nums;white-space:nowrap;z-index:2}
.panel-readout:empty{display:none}
.panel-feedback{margin:0;min-height:2.9em;max-width:min(30em,92vw);text-align:center;font-size:14px;line-height:1.45;color:var(--sub)}
.toolbar{position:fixed;left:0;right:0;bottom:0;padding:0 8px max(8px,env(safe-area-inset-bottom));display:flex;align-items:flex-end;justify-content:space-between;gap:4px;z-index:2}
.tools-left,.tools-right{display:flex;min-width:96px}.tools-right{justify-content:flex-end}
.panel-tools{display:flex}
/* Leaning in: the page becomes the face of the cube, the board its paper plate. */
html.leaning body{background:var(--cube)}
html.leaning .panel-feedback,html.leaning .top .ib,html.leaning .toolbar .ib,html.leaning .panel-readout{color:#f5f1ea}
html.leaning :focus-visible{outline-color:#f5f1ea}
#panel-view.done{pointer-events:none}
@media(prefers-reduced-motion:reduce){body{transition:none}}
.tray{flex:1;display:flex;justify-content:center;align-items:flex-end;min-height:56px}
.slot{width:56px;height:56px;padding:6px;border:1px solid var(--line);background:var(--bg);display:grid;place-items:center}
.slot[hidden]{display:none}
.slot canvas{width:44px;height:44px}
