:root{color-scheme:dark;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#000;color:#ddd;font-synthesis:none}*{box-sizing:border-box}html,body{height:100%;overflow:hidden;overscroll-behavior:none}body{margin:0;background:#000;--reserved-height:280px;--panel-inline:26px}button,.button{font:inherit;font-size:12px;line-height:1.3;color:#ddd;background:#000;border:1px solid #444;border-radius:0;padding:9px 12px;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:35px;white-space:nowrap;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover:not(:disabled),.button:hover{border-color:#aaa;color:#fff}button:disabled{opacity:.35;cursor:default}button.held{background:#fff;color:#000;border-color:#fff}button:focus-visible,a:focus-visible{outline:1px solid #fff;outline-offset:4px}h2{font-weight:400}canvas{display:block;image-rendering:pixelated;image-rendering:crisp-edges;background:#000}#neurons{position:sticky;top:0;z-index:5;background:#000;padding:10px 24px 12px}#neurons h2{font-size:13px;line-height:1.3;margin:0 -24px;padding:7px 24px 0;border-top:1px solid #222}#atlas-map{width:100%;height:60px;cursor:crosshair}main{width:100%;max-width:1280px;margin:0 auto;padding:32px 24px 20px;display:grid;grid-template-columns:minmax(0,712px) minmax(260px,1fr);gap:clamp(32px,5vw,72px);align-items:center}.game-column{min-width:0}.panels{width:min(100%,max(0px,calc((100dvh - var(--reserved-height) - var(--stacked-description-height,0px))*4/3 + var(--panel-inline))));margin:0;display:grid;grid-template-columns:minmax(0,1fr)}.panel{position:relative;min-width:0;margin:0;border:1px solid #444;padding:12px}.panel legend{font-size:14px;line-height:1.4;padding:0 8px;margin-left:1px}#game{width:100%;height:auto;aspect-ratio:4/3;cursor:crosshair;outline:none}.toolbar{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-top:22px}.controls{display:flex;gap:22px;flex-wrap:wrap}.control-group{display:grid;grid-template-columns:repeat(2,minmax(34px,auto));gap:5px}.control-group>span{grid-column:1/-1;font-size:11px;color:#aaa;margin-bottom:3px}.control-group button{padding:8px 10px;touch-action:none;user-select:none;-webkit-user-select:none}.control-group:last-child button{grid-column:1/-1;min-width:70px}.actions{display:flex;gap:8px;flex-wrap:wrap}#error{color:#ffa28b;font-size:12px;line-height:1.6;margin:20px 0 0}#error[hidden]{display:none}
@media(max-width:850px){body{--panel-inline:18px}.panel{padding:8px}.panel legend{font-size:12px;padding:0 6px}.controls{gap:18px}}
@media(max-width:1000px){body{--reserved-height:330px}.toolbar{align-items:start;flex-direction:column;gap:20px}}
@media(max-width:600px){#neurons{padding:9px 16px 10px}#neurons h2{font-size:12px;margin-inline:-16px;padding-inline:16px}body{--reserved-height:320px;--panel-inline:20px}main{padding:28px 16px 20px}.panel{padding:9px}.controls{gap:16px}.control-group button{min-height:39px}.toolbar{margin-top:20px}}
@media(max-width:360px){.controls{gap:9px}.control-group{grid-template-columns:repeat(2,minmax(30px,auto))}.control-group button{padding:8px;min-width:30px}.control-group:last-child button{min-width:60px}}

#loading{position:absolute;inset:0;display:grid;place-items:center;font-size:12px;color:#aaa;pointer-events:none}#loading[hidden]{display:none}

#description{max-width:360px;max-height:calc(100dvh - 180px);overflow-y:auto;overscroll-behavior:contain;font-size:15px;line-height:1.85;color:#bbb}#description p{margin:0 0 24px}#description p:last-child{margin-bottom:0}#description a{color:#ddd;text-underline-offset:3px}#description a:hover{color:#fff}#parameter-count,#layer-count{white-space:nowrap}
@media(max-width:700px){body{--stacked-description-height:calc(var(--description-height,240px) + 24px)}main{max-width:760px;display:flex;flex-direction:column;align-items:start;gap:24px}.game-column{width:100%}#description{max-width:none;width:100%;max-height:30dvh;font-size:13px;line-height:1.7}#description p{margin-bottom:16px}}

/* A text-free, viewport-sized composition for recording: Doom plus a 1:2.5 strip. */
body.twitter-mode{--presentation-height:min(100dvh,calc((100dvw - 8px)*15/26));display:grid;grid-template-columns:calc(var(--presentation-height)*4/3) calc(var(--presentation-height)*2/5);grid-template-rows:var(--presentation-height);gap:8px;align-content:center;justify-content:center}
body.twitter-mode main,body.twitter-mode .game-column,body.twitter-mode .panels{display:contents}
body.twitter-mode .panel{grid-column:1;grid-row:1;width:100%;height:100%;min-height:0;border:0;padding:0}
body.twitter-mode #game{width:100%;height:100%}
body.twitter-mode #neurons{grid-column:2;grid-row:1;position:static;width:100%;height:100%;padding:0;aspect-ratio:2/5}
body.twitter-mode #atlas-map{width:100%;height:100%;aspect-ratio:2/5;cursor:default}
body.twitter-mode #neurons-label,body.twitter-mode legend,body.twitter-mode .toolbar,body.twitter-mode #description,body.twitter-mode #loading,body.twitter-mode #error{display:none}
