/* Game pages: variables the game code expects, and the game frame in the site style */
:root{--hand:'Open Sans','Segoe UI',Arial,sans-serif;--ff:var(--hand);--hf:var(--hand);--body:var(--hand);--hi:#e6f4ff;--gold:#f5b301;--pink:#e11d74;--green:#14b8a6;--edge:#ccc;--panel:#fff;--panel2:#f4f4f4;--acc:#09f;--r:3px;--bw:1px;--sh:none}
.gf{max-width:1000px;margin:0 auto 26px;display:grid;gap:10px}
.gf-title{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;justify-content:center}
.gf-title h1{margin:0;font-size:clamp(26px,4vw,38px);font-weight:400;color:#09f}
.gf-tag{font-weight:700;font-size:12px;padding:2px 8px;border:1px dotted #ccc;border-radius:3px;background:#fff;color:#666}
.gf-screen{position:relative;background:#fff;border:1px dotted #ccc;border-radius:3px;overflow:hidden;display:grid;place-items:center}
.gf-screen>.stage{width:100%;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;min-height:0;padding:12px}
.gf-screen>iframe,.gf-screen .stage iframe{width:100%;height:min(72vh,640px);border:0;display:block;background:#000}
.gf-refresh{position:absolute;top:8px;right:8px;z-index:5;width:36px;height:36px;border:0;background:none;color:#333;padding:6px;cursor:pointer;display:grid;place-items:center}
.gf-ic{border:0;background:none;padding:6px;color:#333;cursor:pointer;display:inline-grid;place-items:center;text-decoration:none}
.gf-ic:hover{color:#09f}.gf-ic:disabled{opacity:.4;cursor:not-allowed}.gf-ic.on svg{fill:#e5493a;stroke:#e5493a}.ico{display:inline-block;vertical-align:middle;flex:none}
.gf-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center}
.gf-btn{border:1px dotted #ccc;border-radius:3px;background:#fff;color:#666;padding:6px 12px;font:600 14px var(--sans);cursor:pointer;text-decoration:none;display:inline-flex;gap:6px;align-items:center}
.gf-btn:hover{border-color:#09f;color:#09f}.gf-btn:disabled{opacity:.5;cursor:not-allowed}
.gf-msg{font-size:14px;font-weight:600;color:#666}
.gf-best{margin-left:auto;font-size:14px;font-weight:600;color:#666}
.gf-side .side{position:static;display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 12px;background:#fff;border:1px dotted #ccc;border-radius:3px;box-shadow:none;width:auto;max-width:none}
.gf-side .side .stats{display:flex;gap:8px}.gf-side .side .btn{width:auto}.gf-side .side .help{margin:0;font-size:13px;flex:1 1 220px}
.gf-screen:fullscreen{background:#fff;display:grid;place-items:center;border:0;border-radius:0}
.gf-screen:fullscreen>.stage{height:100%;display:grid;place-items:center}
.gf-screen:fullscreen .play canvas{max-height:96vh;max-width:96vw;width:auto;height:auto}
.gf-screen:fullscreen iframe{height:100vh}
html.embed .nvbar,html.embed .site-foot,html.embed .prose,html.embed .gf-title,html.embed .gf-bar,html.embed .gf-intro,html.embed .tool-intro,html.embed .gf-refresh,html.embed ins.adsbygoogle{display:none!important}
body[data-section="games"] .tool-main .gf-intro :is(h1,.tag,p,.private){display:none}
.stage.game{padding:14px;min-height:0;align-content:start}
.play{position:relative;width:100%;display:grid;place-items:center}
.play canvas{background:#fff;border:1px dotted #ccc;border-radius:3px;touch-action:none;max-width:100%;height:auto}
.overlay{position:absolute;inset:0;z-index:3;display:grid;place-items:center;align-content:center;gap:10px;text-align:center;background:rgba(255,255,255,.88)}
.overlay[hidden]{display:none}
.overlay h2{font:400 clamp(34px,6vw,56px)/1 var(--sans);text-transform:none;letter-spacing:0;color:#09f;margin:0}
.overlay p{margin:0;color:#666;max-width:32ch}
.hud{display:flex;gap:14px;justify-content:space-between;align-items:center;width:100%;font:600 20px var(--sans);margin-bottom:8px;color:#666}
.hud b{color:#333}
.dpad{display:grid;grid-template-columns:repeat(3,56px);grid-template-rows:repeat(2,48px);gap:6px;justify-content:center;margin-top:12px}
.dpad button{border:1px dotted #ccc;border-radius:3px;background:#fff;color:#333;font-size:20px;cursor:pointer}
.dpad button:active{background:#09f;color:#fff}
.dpad .u{grid-column:2}.dpad .l{grid-column:1;grid-row:2}.dpad .d{grid-column:2;grid-row:2}.dpad .r{grid-column:3;grid-row:2}
@media(hover:hover) and (pointer:fine){.dpad{display:none}}
.help{font-size:14px;color:#666;line-height:1.55;margin:0}
.help kbd,.prose kbd{font:12px var(--mono);border:1px dotted #ccc;border-radius:3px;padding:0 5px;background:#fff;color:#333}
.cell-grid{display:grid;gap:6px;user-select:none}
.cell-grid>button,.cell-grid>div{border:1px dotted #ccc;border-radius:3px;background:#fff;color:#333;font:600 clamp(18px,4vw,30px) var(--sans);cursor:pointer;aspect-ratio:1}
.cell-grid>button:hover{border-color:#09f;color:#09f}
.mutebtn{justify-content:center}
.seg{display:flex;gap:6px;margin:8px 0}
.seg button{flex:1;padding:6px 4px;border:1px dotted #ccc;border-radius:3px;background:#fff;color:#666;font:600 14px var(--sans);cursor:pointer}
.seg button.on{background:#09f;border-color:#09f;color:#fff}

.tool-main .prose{max-width:1000px;margin:48px auto 0;padding:0}
.tool-main .prose h2{font-size:1.5rem;font-weight:400;color:#333}
/* every game gets its own look, early 2000s: glossy XP, Win98 bevel, web 2.0, metal, kitsch stripes, terminal */
body[data-skin] .gf-screen{background:var(--sk-bg,#fff);border:var(--sk-bd,1px dotted #ccc);box-shadow:var(--sk-sh,none);border-radius:var(--sk-rd,3px)}
body[data-skin] .overlay{background:var(--sk-ov,rgba(255,255,255,.88))}
body[data-skin] .overlay h2{color:var(--sk-h,#09f);text-shadow:var(--sk-hsh,none);font-family:var(--sk-ff,inherit)}
body[data-skin] .overlay p,body[data-skin] .hud,body[data-skin] .hud b,body[data-skin] .help{color:var(--sk-tx,#666);font-family:var(--sk-ff,inherit)}
body[data-skin] .gf-screen .btn,body[data-skin] .overlay .btn{background:var(--sk-btn,#09f);border:var(--sk-btnbd,0);color:var(--sk-btnc,#fff);box-shadow:var(--sk-btnsh,none);text-shadow:var(--sk-tsh,none);border-radius:var(--sk-brd,3px);font-family:var(--sk-ff,inherit)}
body[data-skin] .play canvas{border:var(--sk-cv,1px dotted #ccc);border-radius:var(--sk-crd,0)}
body[data-skin] .gf-title h1{color:#333}
body[data-skin="0"]{--sk-bg:linear-gradient(#e3f0ff,#a9cbf7);--sk-bd:4px solid #0a4fd0;--sk-sh:inset 0 0 0 2px #7fb0ff;--sk-rd:9px 9px 3px 3px;--sk-ov:rgba(214,232,255,.9);--sk-h:#0a4fd0;--sk-hsh:1px 1px 0 #fff;--sk-tx:#1d3b73;--sk-btn:linear-gradient(#7fd66b,#2f9a22);--sk-btnbd:1px solid #1d6b14;--sk-brd:6px;--sk-btnsh:inset 0 1px 0 rgba(255,255,255,.7);--sk-tsh:0 -1px 0 rgba(0,0,0,.3);--sk-cv:2px solid #0a4fd0;--sk-ff:Tahoma,Verdana,sans-serif}
body[data-skin="1"]{--sk-bg:#c0c0c0;--sk-bd:3px outset #f4f4f4;--sk-rd:0;--sk-ov:rgba(192,192,192,.93);--sk-h:#000080;--sk-tx:#000;--sk-btn:#c0c0c0;--sk-btnc:#000;--sk-btnbd:3px outset #f4f4f4;--sk-brd:0;--sk-cv:2px inset #808080;--sk-ff:"MS Sans Serif",Tahoma,Arial,sans-serif}
body[data-skin="2"]{--sk-bg:linear-gradient(#fff6e6,#ffd699);--sk-bd:3px solid #e07a00;--sk-sh:0 0 0 3px #ffe2b3,inset 0 2px 0 #fff;--sk-rd:16px;--sk-ov:rgba(255,238,210,.92);--sk-h:#d96b00;--sk-hsh:0 2px 0 #fff;--sk-tx:#7a4a00;--sk-btn:linear-gradient(#ffc266,#f08a00 50%,#e07a00 51%,#f59e22);--sk-btnbd:1px solid #a85a00;--sk-brd:14px;--sk-btnsh:inset 0 1px 0 rgba(255,255,255,.8);--sk-tsh:0 -1px 0 rgba(0,0,0,.35);--sk-cv:2px solid #e07a00;--sk-crd:8px;--sk-ff:"Trebuchet MS",Verdana,sans-serif}
body[data-skin="3"]{--sk-bg:linear-gradient(#1c2e47,#0b1626);--sk-bd:5px ridge #7d9cc4;--sk-rd:0;--sk-ov:rgba(11,22,38,.9);--sk-h:#ffc933;--sk-hsh:2px 2px 0 #000;--sk-tx:#bcd0ea;--sk-btn:linear-gradient(#ffb02e,#d97700);--sk-btnc:#1a0d00;--sk-btnbd:2px outset #ffd27a;--sk-brd:0;--sk-cv:3px groove #7d9cc4;--sk-ff:Impact,"Arial Black",sans-serif}
body[data-skin="4"]{--sk-bg:repeating-linear-gradient(-45deg,#ffe0f0 0 12px,#fff 12px 24px);--sk-bd:4px dashed #c2185b;--sk-sh:5px 5px 0 #7b1fa2;--sk-rd:0;--sk-ov:rgba(255,224,240,.92);--sk-h:#c2185b;--sk-hsh:2px 2px 0 #fff;--sk-tx:#6a1b4d;--sk-btn:#7b1fa2;--sk-btnbd:3px solid #c2185b;--sk-brd:0;--sk-cv:3px dotted #c2185b;--sk-ff:"Comic Sans MS","Comic Sans",cursive}
body[data-skin="5"]{--sk-bg:linear-gradient(#cdeeff,#fff 70%,#b7e29a);--sk-bd:6px double #2a8d8d;--sk-rd:0;--sk-ov:rgba(205,238,255,.9);--sk-h:#2a8d8d;--sk-tx:#2c5f5f;--sk-btn:#f4a300;--sk-btnbd:2px solid #a86d00;--sk-brd:0;--sk-cv:2px solid #2a8d8d;--sk-ff:Verdana,Geneva,sans-serif}
body[data-skin="6"]{--sk-bg:radial-gradient(ellipse at 50% 0,#fff,#bff0ff 55%,#7fd4f0);--sk-bd:3px solid #00a0c8;--sk-sh:inset 0 0 22px #fff,0 0 8px #7fd4f0;--sk-rd:24px;--sk-ov:rgba(214,246,255,.88);--sk-h:#0087ad;--sk-hsh:0 1px 0 #fff;--sk-tx:#14607a;--sk-btn:linear-gradient(#aef,#19b7e0 50%,#0a9cc7 51%,#4fd0f0);--sk-btnbd:1px solid #0a7a9a;--sk-brd:30px;--sk-btnsh:inset 0 1px 0 rgba(255,255,255,.9);--sk-tsh:0 -1px 0 rgba(0,0,0,.3);--sk-cv:2px solid #00a0c8;--sk-crd:12px;--sk-ff:"Lucida Grande","Lucida Sans Unicode",Verdana,sans-serif}
body[data-skin="7"]{--sk-bg:#3b2412 repeating-linear-gradient(90deg,#3b2412 0 18px,#44291a 18px 20px);--sk-bd:7px groove #b8863b;--sk-rd:0;--sk-ov:rgba(40,22,10,.9);--sk-h:#ffd27a;--sk-hsh:2px 2px 0 #000;--sk-tx:#e8cfa4;--sk-btn:#a0302a;--sk-btnbd:3px outset #d9665e;--sk-brd:0;--sk-cv:4px ridge #b8863b;--sk-ff:Georgia,"Times New Roman",serif}
body[data-skin="8"]{--sk-bg:#020d05;--sk-bd:2px solid #19e619;--sk-sh:0 0 12px #19e619,inset 0 0 12px rgba(25,230,25,.25);--sk-rd:0;--sk-ov:rgba(2,13,5,.9);--sk-h:#19e619;--sk-hsh:0 0 8px #19e619;--sk-tx:#7dff7d;--sk-btn:#021a07;--sk-btnc:#19e619;--sk-btnbd:2px solid #19e619;--sk-brd:0;--sk-cv:1px solid #19e619;--sk-ff:"Courier New",Courier,monospace}

.sbwarn{padding:10px 14px;border:1px dotted #e0a100;background:#fffbe6;color:#666;font-size:14px;text-align:center;border-radius:3px}.sbwarn b{color:#333}.sbwarn a{color:#09f}
