:root{color-scheme:light;font-family:system-ui,sans-serif;color:#142e38;background:#f2eedf}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}main{max-width:1328px;margin:auto;padding:16px 12px 28px}header{display:flex;align-items:center;justify-content:space-between;gap:12px}h1{font-size:clamp(22px,4vw,32px);line-height:1.15;margin:0}p{font-size:16px;line-height:1.45;margin:12px 0;overflow-wrap:anywhere}button,summary{font:inherit;font-size:16px;min-height:44px;padding:10px 14px;border:1px solid #526a62;border-radius:10px;background:#fcf9ee;color:#142e38;cursor:pointer}button:focus-visible,summary:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #ba513a;outline-offset:3px}button:disabled{cursor:wait;opacity:.65}.toolbar{display:flex;flex-wrap:wrap;gap:8px}#start{background:#70c9b2;font-weight:700}#stage{width:100%;aspect-ratio:1280/720;background:#142e38;overflow:hidden;border-radius:12px}#canvas{display:block;width:100%;height:auto;touch-action:pan-y;outline-offset:-3px}body[data-layout=mobile] #stage{max-width:720px;margin:auto;aspect-ratio:720/1320}#alternate{margin-top:12px}#controls{padding-top:10px}#progress{width:100%;height:14px}footer{font-size:14px;line-height:1.7}a{color:#245f50}#stage:fullscreen{width:100vw;height:100dvh;max-width:none;aspect-ratio:auto;overflow:auto;border-radius:0;display:flex;align-items:center;justify-content:center}#stage:fullscreen #canvas{width:min(100vw,177.7778dvh);height:auto}body[data-layout=mobile] #stage:fullscreen{align-items:flex-start}body[data-layout=mobile] #stage:fullscreen #canvas{width:min(100vw,720px);height:auto;flex-shrink:0}body[data-embed=true] main{padding:10px 12px}body[data-embed=true] footer{display:none}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

/* Embedded game stages supply their own title, controls and rights text. */
body[data-embed=true],body[data-embed=true] main{height:100dvh;overflow:hidden}body[data-embed=true] main{padding:0;max-width:none;display:flex;flex-direction:column}body[data-embed=true] header,body[data-embed=true] #instructions,body[data-embed=true] main>.toolbar,body[data-embed=true] #note,body[data-embed=true] #rights,body[data-embed=true][data-state=running] #status{display:none}body[data-embed=true] #stage{flex:1;width:100%;min-height:0;max-width:none;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;border-radius:0}body[data-embed=true] #alternate{flex:none;margin:0;max-height:45dvh;overflow:auto}body[data-embed=true] #alternate>summary{height:44px;padding:9px 10px;font-size:13px}

/* Fullscreen controls stay inside the fullscreen element and above the game. */
#stage:fullscreen{flex-direction:column;justify-content:flex-start}#fullscreen-tools{width:100%;min-height:60px;padding:8px;display:flex;justify-content:flex-end;flex-shrink:0;background:#142e38;position:sticky;top:0;z-index:1}#stage:fullscreen #canvas{width:min(100vw,calc(177.7778dvh - 106.6667px));margin:auto 0}body[data-layout=mobile] #stage:fullscreen #canvas{width:min(100vw,720px)}
