/* Nod. By Luke Steuber. The trays are drawn as Tilt draws them. */
@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}
/* Depth is lightness: blocks on the top tray are the strongest ink and each
   tray below steps back toward the page. */
:root{color-scheme:light;--bg:#fff;--ink:#000;--text:#121212;--sub:#5e5e5e;--line:#cfcfcf;--floor:#fff;--ball:#161616;--spec:#4d4d4d;--lv0:#000;--lv1:#4c4c4c;--lv2:#8f8f8f;--hole:#111;--ghost:#7a7a7a;--shaft:#6a6a6a;--frame:#121212;--scrim:rgba(255,255,255,.84);--mono:"Plex Mono",ui-monospace,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:#3c3c3c;--floor:#101010;--ball:#f3f3f3;--spec:#fff;--lv0:#fff;--lv1:#c2c2c2;--lv2:#7d7d7d;--hole:#f5f5f5;--ghost:#8a8a8a;--shaft:#8f8f8f;--frame:#ededed;--scrim:rgba(0,0,0,.8)}}
:root[data-theme=dark]{color-scheme:dark;--bg:#000;--ink:#fff;--text:#ededed;--sub:#a6a6a6;--line:#3c3c3c;--floor:#101010;--ball:#f3f3f3;--spec:#fff;--lv0:#fff;--lv1:#c2c2c2;--lv2:#7d7d7d;--hole:#f5f5f5;--ghost:#8a8a8a;--shaft:#8f8f8f;--frame:#ededed;--scrim:rgba(0,0,0,.8)}
*{box-sizing:border-box;border-radius:0}html,body{height:100%;margin:0}body{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;overscroll-behavior:none}
button,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled,select:disabled{opacity:.35;cursor:default}button:focus-visible,select:focus-visible{outline:2px solid var(--ink);outline-offset:2px}[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,calc(env(safe-area-inset-top) + 16px));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;pointer-events:none}
#restart-btn{position:fixed;top:max(0px,env(safe-area-inset-top));left:8px;z-index:2}
/* While the camera is on: a small solid dot, hollow while no face is seen. */
.live{position:fixed;top:max(18px,calc(env(safe-area-inset-top) + 18px));right:max(20px,env(safe-area-inset-right));width:12px;height:12px;border:1.5px solid var(--ink);border-radius:50%;background:var(--ink);box-shadow:0 0 0 3px var(--bg)}.live[data-face=none]{background:transparent}
#board-shell{position:absolute;top:max(52px,calc(env(safe-area-inset-top) + 44px));right:8px;bottom:max(60px,calc(env(safe-area-inset-bottom) + 54px));left:8px}
#board{position:absolute;left:0;top:0;display:block;overflow:visible;outline:none;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;transition:opacity .3s ease}
#board:focus-visible .tray-frame[data-active=true]{stroke-width:3.5}
/* The payoff only decorates: it never takes a pointer. */
#board .paint,#board .payoff,#board .paint *,#board .payoff *{pointer-events:none}
/* The first screen only lightly dims the trays; calibration sets them well back behind its dots. */
body[data-phase=prompt] #board,body[data-phase=starting] #board{opacity:.8}body[data-phase=calibrating] #board{opacity:.22}
/* The camera's place to begin: one large glyph in the rest area below the
   trays, where the Next disc sits; nod.js places and sizes it. */
.camera-start{position:fixed;left:0;top:0;width:96px;height:96px;border:1px solid var(--ink);border-radius:50%;background:var(--bg);color:var(--ink);display:grid;place-items:center;padding:0;z-index:3}.camera-start svg{width:var(--glyph-icon,40px);height:var(--glyph-icon,40px);fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.camera-start::after{content:"";position:absolute;inset:-9px;border-radius:50%;border:2px solid transparent;pointer-events:none}
body[data-phase=starting] .camera-start::after{border-color:var(--ink) transparent transparent transparent;animation:nod-turn 1.1s linear infinite}
@keyframes nod-turn{to{transform:rotate(1turn)}}
/* The camera's video is never seen, but kept in the page (some browsers stop
   decoding a video that is not laid out). */
#camera{position:fixed;left:0;top:0;width:2px;height:2px;opacity:0;pointer-events:none;z-index:-1}
/* The look layer: the level glyph, the corner and dwell pads, rings, the gaze dot and calibration. */
#gaze-layer{position:fixed;inset:0;width:100vw;height:100dvh;pointer-events:none;z-index:55;overflow:visible}
.vial{fill:var(--bg);stroke:var(--ink);stroke-width:1.25}.rest-ring{fill:none;stroke:var(--sub);stroke-width:1;stroke-dasharray:2 3}.glyph[data-phase=spent] .rest-ring{stroke:var(--ink);stroke-width:2;stroke-dasharray:none}
.bubble{fill:var(--ink)}.glyph[data-face=none] .bubble{fill:none;stroke:var(--ink);stroke-width:1.5}
.edge-track{fill:none;stroke:var(--line);stroke-width:3;stroke-linecap:butt}.edge-fill{fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:butt}
.corner-ring{fill:var(--bg);stroke:var(--ink);stroke-width:1}.corner-icon{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.corner[data-off=true]{opacity:.3}
.dwell-track{fill:none;stroke:var(--bg);stroke-width:7;opacity:.9}.dwell-arc{fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:butt}
.gaze-halo{fill:var(--ink);opacity:.1}.gaze-core{fill:var(--bg);stroke:var(--ink);stroke-width:1.5}
.spot{fill:var(--ink)}.spot-halo{fill:var(--bg)}
.toolbar{position:fixed;bottom:max(6px,env(safe-area-inset-bottom));left:8px;right:8px;display:flex;justify-content:space-between;z-index:2}.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}.toolbar .ib,#restart-btn{color:var(--sub)}.ib:focus-visible{color:var(--ink)}@media(hover:hover) and (pointer:fine){.ib:hover{color:var(--ink)}}
#camera-btn .lens-dot{fill:currentColor;stroke:none;opacity:0}#camera-btn[aria-pressed=true] .lens-dot{opacity:1}
.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{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}.row .text-btn{min-height:44px;background:var(--bg);border:1px solid var(--line);padding:4px 14px}.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}
/* Settings campaign catalog. */
#catalog-title{font:500 16px/1.3 var(--mono);margin:20px 0 12px}.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;color:var(--text)}.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}
@media(max-height:520px) and (min-width:560px){#board-shell{top:36px;right:64px;bottom:6px;left:56px}.toolbar{left:auto;right:8px;top:8px;bottom:8px;flex-direction:column;width:48px}.toolbar>div{flex-direction:column}.readout{top:10px}.live{right:auto;left:62px;top:14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}:root[data-motion=reduce] *,:root[data-motion=reduce] *::before,:root[data-motion=reduce] *::after{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){body[data-phase=starting] .camera-start::after{border-color:var(--ink);border-style:dashed}}:root[data-motion=reduce] body[data-phase=starting] .camera-start::after{border-color:var(--ink);border-style:dashed}
@media(forced-colors:active){:root{--bg:Canvas;--ink:CanvasText;--text:CanvasText;--sub:CanvasText;--line:GrayText;--floor:Canvas;--ball:CanvasText;--spec:Canvas;--lv0:CanvasText;--lv1:CanvasText;--lv2:GrayText;--hole:CanvasText;--ghost:GrayText;--shaft:GrayText;--frame:CanvasText}.edge-fill,.dwell-arc{stroke:Highlight}}
