@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--theme-foreground: #e6e6e6;--theme-background-a: #1b1e23;--theme-foreground-focus: #7a9ce0;color-scheme:dark;--syntax-keyword: #ff9959;--syntax-atom: #79b8ff;--syntax-literal: #b392f0;--syntax-string: #85e89d;--syntax-definition: #79b8ff;--syntax-meta: #f97583}}:root[data-theme=dark]{--theme-foreground: #e6e6e6;--theme-background-a: #1b1e23;--theme-foreground-focus: #7a9ce0;color-scheme:dark;--syntax-keyword: #ff9959;--syntax-atom: #79b8ff;--syntax-literal: #b392f0;--syntax-string: #85e89d;--syntax-definition: #79b8ff;--syntax-meta: #f97583}:root[data-theme=dark] .cm-editor{background:var(--theme-background)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .cm-editor{background:var(--theme-background)}}:root[data-theme=dark] .cm-activeLine,:root[data-theme=dark] .cm-activeLineGutter{background:#ffffff0a}:root[data-theme=dark] .cm-activeLineGutter{background:#ffffff0f}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .cm-activeLine{background:#ffffff0a}:root:not([data-theme=light]) .cm-activeLineGutter{background:#ffffff0f}}:root[data-theme=dark] .cm-tooltip,:root[data-theme=dark] .cm-tooltip.cm-tooltip-autocomplete>ul{background:var(--theme-background-alt);color:var(--theme-foreground);border-color:var(--theme-foreground-faintest)}:root[data-theme=dark] .cm-tooltip-autocomplete>ul>li{color:var(--theme-foreground)}:root[data-theme=dark] .cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--theme-foreground-focus);color:var(--theme-background)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .cm-tooltip,:root:not([data-theme=light]) .cm-tooltip.cm-tooltip-autocomplete>ul{background:var(--theme-background-alt);color:var(--theme-foreground);border-color:var(--theme-foreground-faintest)}:root:not([data-theme=light]) .cm-tooltip-autocomplete>ul>li{color:var(--theme-foreground)}:root:not([data-theme=light]) .cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--theme-foreground-focus);color:var(--theme-background)}}:root[data-theme=dark] .cm-content{caret-color:var(--theme-foreground)}:root[data-theme=dark] .cm-cursor,:root[data-theme=dark] .cm-dropCursor{border-left-color:var(--theme-foreground)}:root[data-theme=dark] .cm-selectionBackground,:root[data-theme=dark] .cm-content ::selection{background:#7a9ce059!important}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .cm-content{caret-color:var(--theme-foreground)}:root:not([data-theme=light]) .cm-cursor,:root:not([data-theme=light]) .cm-dropCursor{border-left-color:var(--theme-foreground)}:root:not([data-theme=light]) .cm-selectionBackground,:root:not([data-theme=light]) .cm-content ::selection{background:#7a9ce059!important}}.code-editor{margin:.5em 0}.code-editor-label{font:500 13px/1.4 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);margin-bottom:4px}.console-output{font-family:var(--monospace),monospace;font-size:13px;line-height:1.5;background:var(--theme-background-alt);border:1px solid var(--theme-foreground-faintest);border-radius:.4em;padding:.5em .75em;margin:.4em 0 1em;max-height:60vh;overflow-y:auto}.console-label{font:500 10px/1 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:.3em}.console-empty{color:var(--theme-foreground-muted);font-style:italic}.console-line{white-space:pre-wrap}.console-error{white-space:pre-wrap;margin-top:.2em;color:color-mix(in srgb,#a32a1a 100%,var(--theme-foreground))}.console-timeout{margin-top:.3em;color:color-mix(in srgb,#7a5a00 100%,var(--theme-foreground))}:root[data-theme=dark] .console-error{color:#f08071}:root[data-theme=dark] .console-timeout{color:#e0c060}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .console-error{color:#f08071}:root:not([data-theme=light]) .console-timeout{color:#e0c060}}.test-report-head{font-weight:600;margin-bottom:.4em}.test-report-row{font-family:var(--monospace),monospace;font-size:12px}.run-toolbar{display:flex;justify-content:flex-end;gap:4px;border:1px solid var(--theme-foreground-faintest);border-top:none;border-bottom-left-radius:.4em;border-bottom-right-radius:.4em;background:var(--theme-background-alt);padding:4px 6px}.run-button{font:500 13px/1 var(--sans-serif);padding:.4em .8em;border:1px solid var(--theme-foreground-faintest);border-radius:.3em;background:var(--theme-background);color:var(--theme-foreground);cursor:pointer;transition:background .1s ease,border-color .1s ease}.run-button:hover{background:color-mix(in srgb,var(--theme-foreground) 8%,var(--theme-background))}.run-button.dirty{border-color:color-mix(in srgb,#d97706 60%,var(--theme-background));color:color-mix(in srgb,#d97706 100%,var(--theme-foreground))}.run-button.dirty:before{content:"● ";color:#d97706}.reset-button{font:500 13px/1 var(--sans-serif);padding:.4em .8em;border:1px solid var(--theme-foreground-faintest);border-radius:.3em;background:transparent;color:var(--theme-foreground-muted);cursor:pointer;transition:background .1s ease,color .1s ease}.reset-button:hover{background:color-mix(in srgb,var(--theme-foreground) 8%,var(--theme-background));color:var(--theme-foreground)}.theme-toggle{position:fixed;top:12px;right:16px;z-index:1000;width:36px;height:36px;border-radius:50%;border:1px solid var(--theme-foreground-faintest);background:var(--theme-background-alt);color:var(--theme-foreground);font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;transition:transform .15s ease,background .15s ease}.theme-toggle:hover{transform:scale(1.06);background:var(--theme-background)}.observablehq p,.observablehq ul,.observablehq ol,.observablehq blockquote,.observablehq .katex-display{max-width:none}.observablehq code{background:#7d7d7d1a;padding:.1em .35em;border-radius:3px;font-size:.9em}.observablehq pre code{background:transparent;padding:0;border-radius:0;font-size:1em}.feedback{padding:.6em .9em;border-radius:.4em;margin:.4em 0;background:color-mix(in srgb,var(--accent, var(--theme-foreground)) 10%,var(--theme-background));color:var(--accent, var(--theme-foreground));border:1px solid color-mix(in srgb,var(--accent, var(--theme-foreground)) 30%,var(--theme-background))}.feedback-ok{--accent: #1b6b1b}.feedback-err{--accent: #a32a1a}.feedback-hint{--accent: #7a5a00}.feedback-info{--accent: #1a3a8a}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .feedback-ok{--accent: #6ec96e}:root:not([data-theme=light]) .feedback-err{--accent: #f08071}:root:not([data-theme=light]) .feedback-hint{--accent: #e0c060}:root:not([data-theme=light]) .feedback-info{--accent: #88a8e8}}:root[data-theme=dark] .feedback-ok{--accent: #6ec96e}:root[data-theme=dark] .feedback-err{--accent: #f08071}:root[data-theme=dark] .feedback-hint{--accent: #e0c060}:root[data-theme=dark] .feedback-info{--accent: #88a8e8}.observablehq blockquote.hint{border-left-width:4px;border-left-style:solid;padding:.6em .9em;margin:.8em 0;border-radius:0 4px 4px 0;background:color-mix(in srgb,var(--hint-accent, var(--theme-foreground)) 8%,var(--theme-background));border-left-color:var(--hint-accent, var(--theme-foreground-fainter))}.observablehq blockquote.hint-tip{--hint-accent: #2d9d2d}.observablehq blockquote.hint-info{--hint-accent: #2d6ec9}.observablehq blockquote.hint-warn{--hint-accent: #d97706}.observablehq blockquote.hint-trivia{--hint-accent: #888888}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .observablehq blockquote.hint-tip{--hint-accent: #6ec96e}:root:not([data-theme=light]) .observablehq blockquote.hint-info{--hint-accent: #88a8e8}:root:not([data-theme=light]) .observablehq blockquote.hint-warn{--hint-accent: #e0b060}:root:not([data-theme=light]) .observablehq blockquote.hint-trivia{--hint-accent: #aaaaaa}}:root[data-theme=dark] .observablehq blockquote.hint-tip{--hint-accent: #6ec96e}:root[data-theme=dark] .observablehq blockquote.hint-info{--hint-accent: #88a8e8}:root[data-theme=dark] .observablehq blockquote.hint-warn{--hint-accent: #e0b060}:root[data-theme=dark] .observablehq blockquote.hint-trivia{--hint-accent: #aaaaaa}.observablehq details{margin:.5em 0;padding:.4em .7em;background:#7d7d7d0d;border-radius:4px;border:1px solid var(--theme-foreground-faintest)}.observablehq details>summary{cursor:pointer;font:500 14px/1.4 var(--sans-serif);color:var(--theme-foreground-muted);-webkit-user-select:none;user-select:none}.observablehq details[open]>summary{margin-bottom:.4em}:root{--bg-panel-width: clamp(420px, 42vw, 880px)}.bg-app body{position:fixed;inset:0;display:flex;flex-direction:column;margin:0;max-width:none;overflow:hidden}.bg-app.bg-has-panel body{right:var(--bg-panel-width)}.bg-app.bg-has-panel .theme-toggle{right:calc(16px + var(--bg-panel-width))}.bg-app.bg-has-panel .debug-panel{right:var(--bg-panel-width)!important}.bg-app .theme-toggle{z-index:100000}.debug-panel .visibility-toggle{display:none!important}.bg-app main{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 24px}.bg-panel{position:fixed;top:0;right:0;bottom:0;width:var(--bg-panel-width);z-index:900;display:flex;flex-direction:column;background:var(--theme-background);border-left:1px solid var(--theme-foreground-faintest);box-shadow:-6px 0 24px #00000012;transition:transform .2s ease}.bg-panel.bg-collapsed{transform:translate(100%)}.bg-panel .cm-editor,.bg-panel .cm-content{font-size:15px}.bg-panel-resizer{position:absolute;left:0;top:0;bottom:0;width:10px;margin-left:-5px;cursor:col-resize;z-index:902;touch-action:none}.bg-panel-resizer:after{content:"";position:absolute;top:0;bottom:0;left:4px;width:2px;background:transparent;transition:background .15s ease}.bg-panel-resizer:hover:after,.bg-panel-resizer:active:after{background:var(--theme-foreground-focus, #7a9ce0)}.bg-panel-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid var(--theme-foreground-faintest);background:var(--theme-background-alt);font:600 13px/1 var(--sans-serif),sans-serif}.bg-panel-head code{font-size:13px}.bg-panel-btn{border:1px solid var(--theme-foreground-faintest);border-radius:.3em;background:var(--theme-background);color:var(--theme-foreground-muted);cursor:pointer;font:500 12px/1 var(--sans-serif),sans-serif;padding:.4em .6em}.bg-panel-btn:hover{color:var(--theme-foreground)}.bg-panel-editor{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:12px 14px}.bg-editor-fill{display:flex;flex-direction:column;min-height:0;height:100%;margin:0}.bg-editor-fill .code-editor-label{display:none}.bg-editor-fill>div:not(.code-editor-label):not(.run-toolbar){flex:1 1 auto;min-height:0}.bg-editor-fill .cm-editor{height:100%}.bg-editor-fill .cm-scroller{overflow:auto}.bg-editor-fill .run-toolbar{flex:0 0 auto}.bg-panel-tab{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:901;writing-mode:vertical-rl;padding:16px 9px;border:1px solid var(--theme-foreground-faintest);border-right:none;border-radius:8px 0 0 8px;background:var(--theme-background-alt);color:var(--theme-foreground);cursor:pointer;font:600 12px/1 var(--sans-serif),sans-serif;display:none}html.bg-panel-hidden .bg-panel-tab{display:block}.bg-game-section{flex:0 0 auto;z-index:850;display:flex;flex-direction:column;background:var(--theme-background-alt);border-bottom:1px solid var(--theme-foreground-faintest);box-shadow:0 4px 12px #0000000f;max-height:65vh}.bg-game-section-head{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:8px 14px}.bg-game-section-title{font:600 12px/1 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);text-transform:uppercase;letter-spacing:.4px}.bg-game-section-body{overflow-y:auto;padding:4px 14px 14px}.bg-game-section.bg-collapsed{max-height:none}.bg-game-section.bg-collapsed .bg-game-section-body{display:none}.bg-game-section .bg-game{margin-top:0}.bg-panel-section-label{font:600 12px/1.3 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);text-transform:uppercase;letter-spacing:.4px;margin:1em 0 .3em}@media(max-width:900px){.bg-app body{position:static;display:block;overflow:visible;right:auto}.bg-app main{overflow:visible;min-height:0;padding:0}.bg-app.bg-has-panel .theme-toggle{right:16px}.bg-app.bg-has-panel .debug-panel{right:0!important}.bg-panel{position:static;width:auto;box-shadow:none;transform:none;border:none;border-top:1px solid var(--theme-foreground-faintest)}.bg-panel-editor{height:60vh}.bg-panel-resizer{display:none}.bg-game-section{max-height:none}}.bg-game{margin:.6em 0 1em}.bg-status{font:500 15px/1.4 var(--sans-serif),sans-serif;margin-bottom:.5em}.bg-status-win{color:#1b6b1b;font-weight:600}.bg-status-draw{color:#7a5a00;font-weight:600}:root[data-theme=dark] .bg-status-win{color:#6ec96e}:root[data-theme=dark] .bg-status-draw{color:#e0c060}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .bg-status-win{color:#6ec96e}:root:not([data-theme=light]) .bg-status-draw{color:#e0c060}}.bg-board{display:grid;grid-template-columns:repeat(3,64px);grid-template-rows:repeat(3,64px);gap:6px;width:max-content}.bg-cell{width:64px;height:64px;font-size:32px;line-height:1;display:flex;align-items:center;justify-content:center;border:1px solid var(--theme-foreground-faintest);border-radius:.4em;background:var(--theme-background-alt);color:var(--theme-foreground);cursor:pointer;transition:background .1s ease,transform .05s ease}.bg-cell:hover:not(:disabled){background:color-mix(in srgb,var(--theme-foreground) 8%,var(--theme-background))}.bg-cell:active:not(:disabled){transform:scale(.95)}.bg-cell:disabled{cursor:default;opacity:.85}.bg-debug{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:.7em 0 .3em;font-size:13px}.bg-debug-label{font:500 12px/1 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);text-transform:uppercase;letter-spacing:.5px}.bg-idx{font-family:var(--monospace),monospace;padding:.3em .4em;border:1px solid var(--theme-foreground-faintest);border-radius:.3em;background:var(--theme-background);color:var(--theme-foreground)}.bg-notice:empty{display:none}.bg-state{margin-top:.5em}.bg-state-tools{margin:.6em 0 .3em}:root[data-theme=dark] .debug-panel{color:#cfd3da!important;--string-color: var(--syntax-string, #85e89d);--number-color: var(--syntax-atom, #79b8ff);--boolean-color: var(--syntax-literal, #b392f0);--null-color: var(--syntax-meta, #f97583);--undefined-color: var(--syntax-meta, #f97583);--function-color: var(--syntax-keyword, #ff9959);--symbol-color: var(--syntax-string, #85e89d);--date-color: var(--syntax-atom, #79b8ff);--label-color: #cfd3da;--arrow-color: #cfd3da;--json-tree-null-color: #9aa0aa}:root[data-theme=dark] .debug-panel .pane,:root[data-theme=dark] .debug-panel .secondary-pane{background:#1b1e23!important;border-left-color:#3a3f47!important;box-shadow:-1px 0 5px #00000080!important}:root[data-theme=dark] .debug-panel button{background:#23272e!important;color:#cfd3da!important;border-color:#3a3f47!important}:root[data-theme=dark] .debug-panel select{background:#23272e!important;color:#cfd3da!important;border-color:#3a3f47!important}:root[data-theme=dark] .debug-panel .visibility-toggle{background:#23272e!important;color:#cfd3da!important;border-color:#3a3f47!important}:root[data-theme=dark] .debug-panel .visibility-toggle:hover,:root[data-theme=dark] .debug-panel .visibility-toggle:focus{background:#2d323a!important}:root[data-theme=dark] .debug-panel .menu{border-color:#3a3f47!important}:root[data-theme=dark] .debug-panel .menu-item{background:#1b1e23!important;color:#cfd3da!important}:root[data-theme=dark] .debug-panel .menu-item.active,:root[data-theme=dark] .debug-panel .menu-item:hover,:root[data-theme=dark] .debug-panel .menu-item:focus{background:#2d323a!important;color:#fff!important}:root[data-theme=dark] .debug-panel .key button{background:#23272e!important;color:#cfd3da!important;border-color:#3a3f47!important;box-shadow:1px 1px 1px #000!important}:root[data-theme=dark] .debug-panel .key button:hover,:root[data-theme=dark] .debug-panel .key.active button{background:#2d323a!important}:root[data-theme=dark] .debug-panel .move{color:#b8bdc6!important}:root[data-theme=dark] .debug-panel .move:hover{color:#e6e6e6!important}:root[data-theme=dark] .debug-panel .move.active{color:#fff!important}:root[data-theme=dark] .debug-panel .move-error{color:#f08071!important}:root[data-theme=dark] .debug-panel .player{background:#2d323a!important;border-color:#1b1e23!important}:root[data-theme=dark] .debug-panel .player.current{background:#cfd3da!important;color:#1b1e23!important}:root[data-theme=dark] .debug-panel .player.active{border-color:coral!important}:root[data-theme=dark] .debug-panel .log-event{background:#23272e!important;color:#b8bdc6!important;border-top-color:#3a3f47!important;border-right-color:#3a3f47!important;border-bottom-color:#3a3f47!important}:root[data-theme=dark] .debug-panel .log-event:hover,:root[data-theme=dark] .debug-panel .log-event:focus,:root[data-theme=dark] .debug-panel .log-event.pinned{background:#2d323a!important}:root[data-theme=dark] .debug-panel label{color:#b8bdc6!important}:root[data-theme=dark] .debug-panel .value{color:#e6e6e6!important}.canvas-output{margin:.4em 0 1em}.canvas-label{font:500 10px/1 var(--sans-serif),sans-serif;color:var(--theme-foreground-muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:.3em}.canvas-frame{display:inline-block;padding:0;border:1px solid var(--theme-foreground-faintest);border-radius:.4em;overflow:hidden;line-height:0;background-color:var(--theme-background-alt);background-image:linear-gradient(45deg,color-mix(in srgb,var(--theme-foreground-faintest) 60%,transparent) 25%,transparent 25%),linear-gradient(-45deg,color-mix(in srgb,var(--theme-foreground-faintest) 60%,transparent) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,color-mix(in srgb,var(--theme-foreground-faintest) 60%,transparent) 75%),linear-gradient(-45deg,transparent 75%,color-mix(in srgb,var(--theme-foreground-faintest) 60%,transparent) 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}.canvas-surface{display:block;max-width:100%;height:auto}.canvas-error{white-space:pre-wrap;margin-top:.4em;font-family:var(--monospace),monospace;font-size:13px;color:color-mix(in srgb,#a32a1a 100%,var(--theme-foreground))}:root[data-theme=dark] .canvas-error{color:#f08071}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .canvas-error{color:#f08071}}
