@font-face { font-family: Pix; src: url(/fonts/silkscreen-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Pix; src: url(/fonts/silkscreen-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0b10;
  --panel: #15151d;
  --line: #2a2a36;
  --ink: #e9e7df;
  --dim: #8b8a96;
  --hot: #ffd23f;
  --c: var(--hot);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--mono); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding: 0 16px; background: var(--bg); }
a { color: inherit; text-decoration: none; }
b { color: var(--ink); font-weight: 700; }
.logo { font: 700 1em Pix, var(--mono); letter-spacing: .02em; }

/* shelf */
.hero { max-width: 1280px; margin: 0 auto; padding: 72px 0 40px; }
.hero .logo { font-size: clamp(64px, 14vw, 140px); line-height: .9; color: var(--hot); text-shadow: 4px 4px 0 #ff4f6d, 8px 8px 0 #3fe0ff; }
.hero p { max-width: 34em; margin-top: 24px; color: var(--dim); font-size: 17px; }
.hero .tally { margin-top: 12px; font: 400 13px Pix, var(--mono); color: var(--hot); text-transform: uppercase; }
.carts { list-style: none; padding: 0; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.cart { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px; transition: transform .15s ease, border-color .15s ease; }
.cart:not(.empty):hover { transform: translateY(-3px); border-color: var(--c); }
.cart:not(.empty):active { transform: translateY(-1px) scale(.99); }
.cart a { display: block; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 2px; overflow: hidden; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .25) 2px 3px); }
.empty .screen { display: grid; place-items: center; font: 400 12px Pix, var(--mono); color: var(--line); }
.label { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font: 700 14px Pix, var(--mono); text-transform: uppercase; }
.label .no { color: var(--c); }
.label .size { font: 400 12px var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.empty .label { color: var(--dim); }
.empty .label .no { color: var(--line); }
.hi { margin-top: 6px; font: 400 11px Pix, var(--mono); color: var(--c); text-transform: uppercase; }
.hi:empty { display: none; }
.blurb { margin-top: 4px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.label .name { flex: 1; font: inherit; margin: 0; }
.about { max-width: 1280px; margin: 64px auto 0; color: var(--dim); }
.about h2 { font: 700 18px Pix, var(--mono); color: var(--ink); text-transform: uppercase; }
.about p { max-width: 44em; margin-top: 12px; }
.foot { max-width: 1280px; margin: 0 auto; padding: 56px 0 40px; color: var(--dim); font-size: 12px; text-align: center; }
.copyleft { display: inline-block; transform: scaleX(-1); }
.foot a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: var(--hot); }
.attract .foot { display: none; }

/* play */
.bar { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 16px 0; }
.bar .logo { font-size: 22px; color: var(--hot); }
.bar nav { display: flex; gap: 4px; }
.bar nav a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 4px; font-size: 20px; color: var(--dim); }
.bar nav a:hover { color: var(--ink); border-color: var(--dim); }
.play main { max-width: 1100px; margin: 0 auto; padding-bottom: 48px; }
.tv { position: relative; background: #000; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.tv { display: grid; place-items: center; }
.tv canvas { display: block; width: min(100%, calc((100dvh - 160px) * 16 / 9)); aspect-ratio: 16 / 9; image-rendering: pixelated; }
.tv::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .18) 2px 3px), radial-gradient(ellipse at center, transparent 60%, rgb(0 0 0 / .45)); }
.info { max-width: 44em; margin-top: 28px; color: var(--dim); }
.info h1 { font: 700 32px Pix, var(--mono); color: var(--ink); text-transform: uppercase; }
.info h1 .no { color: var(--c); }
.info p { margin-top: 10px; }
.info p a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 3px; }
.meter { height: 8px; background: var(--line); border-radius: 1px; margin-top: 24px !important; }
.meter span { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 1px; }
.bytes { font-size: 13px; font-variant-numeric: tabular-nums; }
details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: var(--ink); }
.code { margin-top: 12px; padding: 14px; background: var(--panel); border-radius: 4px; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--ink); max-height: 420px; overflow: auto; }

/* attract mode: the shelf iframes show only the running game */
.attract body { padding: 0; overflow: hidden; background: #000; }
.attract .bar, .attract .info { display: none; }
.attract main { padding: 0; }
.attract .tv { border: 0; border-radius: 0; }
.attract .tv::after { display: none; }
.attract .tv canvas { width: min(100vw, 100dvh * 16 / 9); }
.attract .tv { height: 100dvh; }

@media (prefers-reduced-motion: reduce) { .cart { transition: none; } }
