/* Settings → Motion & effects → Games. Art (--ga-*) is generated by
   js/game-art.js; scene markup lives in #bg-dynamic (index.html). Sizes use
   container units so the same markup renders full-page and as a picker thumb. */
.g-scene, .g-thumb{ container-type:size; background:#000; overflow:hidden; }
.g-scene *, .g-thumb *{ position:absolute; display:block; box-sizing:border-box; }
.g-scene{ filter:saturate(1.15) contrast(1.05); }
.g-thumb *{ animation-play-state:paused !important; }
/* Score line, then CRT scanlines + tube vignette over everything. */
.g-scene::before{
  content:attr(data-hud); position:absolute; left:0; right:0; z-index:5;
  top:calc(var(--headH, 64px) + 10px);
  white-space:pre; text-align:center; color:var(--hud, #fff);
  font:700 clamp(11px, 1.5cqw, 17px)/1.4 ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  letter-spacing:.24em; text-shadow:0 0 6px currentColor;
}
.g-scene::after{
  content:''; position:absolute; inset:0; z-index:10; pointer-events:none;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.32) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(0,0,0,.65) 100%);
}
/* Portrait raster games sit in a centred board, like a rotated arcade monitor. */
.g-board{
  left:50%; top:54%; aspect-ratio:var(--ar);
  height:min(78cqh, calc(94cqw / var(--ar))); transform:translate(-50%, -50%);
}
.g-thumb .g-board{ top:50%; height:min(94cqh, calc(98cqw / var(--ar))); }
@keyframes g-f2{ 0%{ background-position:0 0; } 50%{ background-position:100% 0; } }
@keyframes g-f4{
  0%{ background-position:0 0; } 25%{ background-position:33.333% 0; }
  50%{ background-position:66.667% 0; } 75%{ background-position:100% 0; }
}
@keyframes g-blink{ 50%{ opacity:0; } }
@keyframes g-spin{ to{ transform:rotate(360deg); } }

/* ---- Night Driver (Atari, 1976): white pylons rushing out of the dark ---- */
.g-nd-road{ inset:0; transform-origin:50% 100%; animation:g-nd-curve 11s ease-in-out infinite; }
.g-nd-p{
  left:48.8%; top:36%; width:1.4cqh; height:3.2cqh; background:#fff; opacity:0;
  box-shadow:0 0 .8cqh rgba(255,255,255,.7);
  animation:g-nd-l 1.96s cubic-bezier(.6, .02, .96, .5) infinite;
  animation-delay:calc(var(--i) * -.28s);
}
.g-nd-p.r{ left:50.4%; animation-name:g-nd-r; }
@keyframes g-nd-l{
  0%{ left:48.8%; top:36%; transform:scale(.1); opacity:0; } 8%{ opacity:1; }
  100%{ left:-16%; top:116%; transform:scale(3); opacity:1; }
}
@keyframes g-nd-r{
  0%{ left:50.4%; top:36%; transform:scale(.1); opacity:0; } 8%{ opacity:1; }
  100%{ left:114%; top:116%; transform:scale(3); opacity:1; }
}
@keyframes g-nd-curve{
  0%, 100%{ transform:skewX(0); } 22%{ transform:skewX(18deg); } 45%{ transform:skewX(4deg); }
  70%{ transform:skewX(-20deg); } 88%{ transform:skewX(-6deg); }
}
.g-nd-car{
  left:50%; bottom:5%; height:10cqh; aspect-ratio:2; transform:translateX(-50%);
  background:var(--ga-ndCar) 0 0/100% 100% no-repeat; animation:g-nd-steer 11s ease-in-out infinite;
}
@keyframes g-nd-steer{ 0%, 100%{ margin-left:0; } 22%{ margin-left:-4cqw; } 70%{ margin-left:4cqw; } }

/* ---- Pac-Man (Namco, 1980): the real 28×31 maze, chase through row 5 ---- */
.g-pacman{ --ar:.9032; }
.g-pm-maze{ inset:0; background:var(--ga-pmMaze) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .4cqh rgba(40,40,255,.75)); }
.g-pm-pellets{ inset:0; background:var(--ga-pmPellets) 0 0/100% 100% no-repeat; animation:g-blink .45s steps(1) infinite; }
.g-pm-eat{ left:3.571%; top:16.13%; height:3.226%; width:1.786%; background:#000; animation:g-pm-eat 7s linear -3s infinite; }
@keyframes g-pm-eat{ from{ width:1.786%; } to{ width:91.07%; } }
.g-pm-a{
  left:2.5%; top:15.16%; width:5.714%; height:5.161%; background:0 0/200% 100% no-repeat;
  animation:g-pm-run 7s linear infinite, g-f2 .28s steps(1) infinite;
}
.g-pm-pac{ background-image:var(--ga-pac); background-size:400% 100%; animation-name:g-pm-run, g-f4; animation-duration:7s, .24s; animation-delay:-3s, 0s; }
.g-pm-ghost.b{ background-image:var(--ga-blinky); animation-delay:-2.3s, 0s; }
.g-pm-ghost.p{ background-image:var(--ga-pinky); animation-delay:-1.6s, -.1s; }
.g-pm-ghost.i{ background-image:var(--ga-inky); animation-delay:-.9s, -.2s; }
.g-pm-ghost.c{ background-image:var(--ga-clyde); animation-delay:-.2s, 0s; }
@keyframes g-pm-run{ from{ left:2.5%; } to{ left:91.79%; } }

/* ---- Space Invaders (Taito, 1978): stepping formation under colour gels ---- */
.g-invaders{ --ar:.875; }
.g-invaders .g-board{ background:#000; overflow:hidden; }
.g-si-ufo{ left:-10%; top:12%; width:7.14%; height:2.73%; background:var(--ga-siUfo) 0 0/100% 100% no-repeat; animation:g-si-ufo 16s linear -4s infinite; }
@keyframes g-si-ufo{ 0%{ left:-10%; } 32%, 100%{ left:104%; } }
.g-si-fleet{
  left:10.71%; top:22%; width:78.57%; height:31.25%; background:var(--ga-siFleet) 0 0/200% 100% no-repeat;
  animation:g-si-march 20s steps(9) infinite, g-f2 .9s steps(1) infinite;
}
@keyframes g-si-march{
  0%{ transform:translate(-9%, 0); } 22%{ transform:translate(9%, 0); } 25%{ transform:translate(9%, 8%); }
  47%{ transform:translate(-9%, 8%); } 50%{ transform:translate(-9%, 16%); } 72%{ transform:translate(9%, 16%); }
  75%{ transform:translate(9%, 24%); } 97%{ transform:translate(-9%, 24%); } 100%{ transform:translate(-9%, 0); }
}
.g-si-shields{ left:0; top:74%; width:100%; height:6.25%; background:var(--ga-siShields) 0 0/100% 100% no-repeat; }
.g-si-cannon{ left:14%; top:86%; width:5.8%; height:3.125%; background:var(--ga-siCannon) 0 0/100% 100% no-repeat; animation:g-si-move 12s steps(60) infinite; }
@keyframes g-si-move{ 0%, 100%{ left:14%; } 40%{ left:72%; } 70%{ left:40%; } }
.g-si-cannon > i{ left:46%; bottom:100%; width:8%; height:110%; background:#fff; animation:g-si-shot 1.5s linear infinite; }
@keyframes g-si-shot{
  0%{ transform:translateY(0); opacity:1; } 60%{ transform:translateY(-2000%); opacity:1; }
  61%, 100%{ transform:translateY(-2000%); opacity:0; }
}
.g-si-ground{ left:0; right:0; top:93%; height:.45%; background:#fff; }
.g-si-gel{
  inset:0; z-index:3; mix-blend-mode:multiply;
  background:linear-gradient(180deg, #fff 0 9%, #ff2a2a 9% 17%, #fff 17% 70%, #1aff3a 70% 100%);
}

/* ---- Centipede (Atari, 1981): mushroom field, snaking segments, spider ---- */
.g-centipede{ --hud:#ff4a1c; --ar:.9677; }
.g-cp-field{ inset:0; background:var(--ga-cpField) 0 0/100% 100% no-repeat; }
.g-cp-seg{
  left:0; top:3.226%; width:3.333%; height:3.226%; background:var(--ga-cpBody) 0 0/100% 100% no-repeat;
  animation:g-cp-crawl 24s linear infinite; animation-delay:calc(-3s + var(--i) * .11s);
}
.g-cp-seg.h{ background-image:var(--ga-cpHead); }
@keyframes g-cp-crawl{
  0%{ left:0; top:3.226%; } 11.5%{ left:96.67%; top:3.226%; } 12.5%{ left:96.67%; top:6.452%; }
  24%{ left:0; top:6.452%; } 25%{ left:0; top:9.677%; } 36.5%{ left:96.67%; top:9.677%; }
  37.5%{ left:96.67%; top:12.9%; } 49%{ left:0; top:12.9%; } 50%{ left:0; top:16.13%; }
  61.5%{ left:96.67%; top:16.13%; } 62.5%{ left:96.67%; top:19.35%; } 74%{ left:0; top:19.35%; }
  75%{ left:0; top:22.58%; } 86.5%{ left:96.67%; top:22.58%; } 87.5%{ left:96.67%; top:25.81%; }
  99%{ left:0; top:25.81%; } 100%{ left:0; top:3.226%; }
}
.g-cp-spider{
  left:-8%; top:84%; width:6.25%; height:3.226%; background:var(--ga-cpSpider) 0 0/200% 100% no-repeat;
  animation:g-cp-spider 7s linear infinite, g-f2 .3s steps(1) infinite;
}
@keyframes g-cp-spider{
  0%{ left:-8%; top:84%; } 12%{ left:6%; top:72%; } 24%{ left:20%; top:88%; } 36%{ left:36%; top:74%; }
  48%{ left:52%; top:90%; } 60%{ left:66%; top:76%; } 72%{ left:80%; top:86%; } 84%{ left:94%; top:73%; }
  100%{ left:108%; top:84%; }
}
.g-cp-elf{ left:48%; top:93%; width:2.92%; height:3.63%; background:var(--ga-cpElf) 0 0/100% 100% no-repeat; animation:g-cp-elf 6s ease-in-out infinite; }
@keyframes g-cp-elf{ 0%, 100%{ left:48%; top:93%; } 30%{ left:30%; top:90%; } 60%{ left:64%; top:94%; } }
.g-cp-elf > i{ left:42%; bottom:100%; width:16%; height:70%; background:#ffff60; animation:g-cp-shot .32s linear infinite; }
@keyframes g-cp-shot{ to{ transform:translateY(-3200%); } }

/* ---- Asteroids (Atari, 1979): white vectors drifting with wraparound ---- */
.g-as-r{
  left:var(--x0); top:var(--y0); aspect-ratio:1; background:0 0/100% 100% no-repeat;
  filter:drop-shadow(0 0 .35cqh #fff); animation:g-as-drift var(--t) linear infinite;
}
.g-as-r.L{ height:15cqh; } .g-as-r.M{ height:8cqh; } .g-as-r.S{ height:4cqh; }
.g-as-r.a0{ background-image:var(--ga-as0); } .g-as-r.a1{ background-image:var(--ga-as1); } .g-as-r.a2{ background-image:var(--ga-as2); }
@keyframes g-as-drift{ from{ left:var(--x0); top:var(--y0); } to{ left:var(--x1); top:var(--y1); } }
.g-as-ship{
  left:50%; top:52%; height:5.4cqh; aspect-ratio:.8; margin:-2.7cqh 0 0 -2.16cqh;
  background:var(--ga-asShip) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .35cqh #fff);
  animation:g-as-turn 14s steps(1) infinite;
}
.g-as-ship::after{
  content:''; position:absolute; inset:0; background:var(--ga-asFlame) 0 0/100% 100% no-repeat;
  animation:g-blink .08s steps(1) infinite, g-as-thrust 14s steps(1) infinite;
}
@keyframes g-as-turn{
  0%{ transform:rotate(0); } 14%{ transform:rotate(45deg); } 28%{ transform:rotate(112.5deg); } 42%{ transform:rotate(202.5deg); }
  56%{ transform:rotate(270deg); } 70%{ transform:rotate(315deg); } 84%{ transform:rotate(22.5deg); }
}
@keyframes g-as-thrust{ 0%{ visibility:hidden; } 30%{ visibility:visible; } 38%{ visibility:hidden; } 70%{ visibility:visible; } 76%{ visibility:hidden; } }
.g-as-ship > i{ left:44%; top:0; width:.5cqh; height:.5cqh; background:#fff; box-shadow:0 0 .4cqh #fff; animation:g-as-fire .9s linear infinite; }
.g-as-ship > i:nth-child(2){ animation-delay:-.3s; }
.g-as-ship > i:nth-child(3){ animation-delay:-.6s; }
@keyframes g-as-fire{
  0%{ transform:translateY(0); opacity:1; } 85%{ transform:translateY(-38cqh); opacity:1; }
  86%, 100%{ transform:translateY(-38cqh); opacity:0; }
}
.g-as-saucer{
  left:-10%; top:30%; height:3.4cqh; aspect-ratio:1.333; background:var(--ga-asSaucer) 0 0/100% 100% no-repeat;
  filter:drop-shadow(0 0 .35cqh #fff); animation:g-as-saucer 22s linear -6s infinite;
}
@keyframes g-as-saucer{
  0%{ left:-10%; top:30%; } 10%{ left:20%; top:30%; } 15%{ left:34%; top:22%; } 25%{ left:62%; top:22%; }
  30%{ left:76%; top:34%; } 40%, 100%{ left:112%; top:34%; }
}

/* ---- Tempest (Atari, 1981): colour-vector web, claw on the rim, flippers ---- */
.g-tempest{ --hud:#30ff60; --ar:1; }
.g-tempest .g-board{ top:55%; height:min(82cqh, 94cqw); }
.g-tp-warp{ inset:0; animation:g-tp-warp 20s ease-in infinite; }
@keyframes g-tp-warp{
  0%, 84%{ transform:scale(1); opacity:1; } 93%{ transform:scale(3.4); opacity:0; }
  94%{ transform:scale(.2); opacity:0; } 100%{ transform:scale(1); opacity:1; }
}
.g-tp-web{ inset:0; background:var(--ga-tpWeb) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .5cqh #3348ff); }
.g-tp-lane{ inset:0; transform:rotate(var(--a)); }
.g-tp-flip{
  left:48%; top:46.5%; width:18%; height:7%; opacity:0; background:var(--ga-tpFlipper) 0 0/100% 100% no-repeat;
  filter:drop-shadow(0 0 .4cqh #f22); animation:g-tp-climb var(--t, 3.6s) linear infinite; animation-delay:var(--d, 0s);
}
@keyframes g-tp-climb{
  0%{ left:48%; transform:rotate(90deg) scale(.12); opacity:0; } 6%{ opacity:1; }
  78%{ left:87%; transform:rotate(90deg) scale(1); } 88%{ left:87%; transform:rotate(270deg) scale(1); opacity:1; }
  100%{ left:87%; transform:rotate(270deg) scale(1); opacity:0; }
}
.g-tp-claw{ inset:0; animation:g-tp-claw 9s steps(1) infinite; }
.g-tp-claw > b{ left:87%; top:45.5%; width:18%; height:9%; transform:rotate(90deg); background:var(--ga-tpClaw) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .5cqh #ff0); }
.g-tp-shot{ left:94%; top:49.2%; width:1.6%; height:1.6%; border-radius:50%; background:#ffff60; box-shadow:0 0 .5cqh #ff0; animation:g-tp-shot .5s linear infinite; }
@keyframes g-tp-shot{ from{ left:94%; transform:scale(1); } to{ left:56%; transform:scale(.25); } }
@keyframes g-tp-claw{
  0%{ transform:rotate(11.25deg); } 10%{ transform:rotate(33.75deg); } 20%{ transform:rotate(56.25deg); }
  30%{ transform:rotate(78.75deg); } 40%{ transform:rotate(56.25deg); } 50%{ transform:rotate(33.75deg); }
  60%{ transform:rotate(11.25deg); } 70%{ transform:rotate(-11.25deg); } 80%{ transform:rotate(-33.75deg); }
  90%{ transform:rotate(-11.25deg); }
}

/* ---- Battlezone (Atari, 1980): vector horizon under red/green overlay ---- */
.g-bz-horizon{ left:0; right:0; top:60%; height:2px; background:#fff; box-shadow:0 0 .5cqh #fff; }
.g-bz-mtn{
  left:0; top:calc(60% - 13cqh); width:200%; height:13cqh; background:var(--ga-bzMountains) 0 0/50% 100% repeat-x;
  filter:drop-shadow(0 0 .3cqh #fff); animation:g-bz-pan 46s linear infinite;
}
@keyframes g-bz-pan{ to{ transform:translateX(-50%); } }
.g-bz-moon{ left:74%; top:35%; height:8cqh; aspect-ratio:1; background:var(--ga-bzMoon) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .3cqh #fff); }
.g-bz-obj{ left:110%; bottom:40%; background:0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .3cqh #fff); animation:g-bz-slide var(--t) linear infinite; }
.g-bz-obj.pyr{ height:10cqh; aspect-ratio:1.43; background-image:var(--ga-bzPyramid); }
.g-bz-obj.cube{ height:8cqh; aspect-ratio:1.29; background-image:var(--ga-bzCube); }
.g-bz-obj.far{ height:5cqh; }
@keyframes g-bz-slide{ from{ left:110%; } to{ left:-25%; } }
.g-bz-tank{
  left:56%; bottom:39%; height:11cqh; aspect-ratio:2.29; transform-origin:50% 100%;
  background:var(--ga-bzTank) 0 0/100% 100% no-repeat; filter:drop-shadow(0 0 .3cqh #fff);
  animation:g-bz-tank 12s ease-in infinite;
}
@keyframes g-bz-tank{
  0%{ transform:translate(0, 0) scale(.12); opacity:0; } 8%{ opacity:1; }
  80%{ transform:translate(-30%, 40%) scale(1.5); opacity:1; } 81%, 100%{ transform:translate(-30%, 40%) scale(1.5); opacity:0; }
}
.g-bz-sight{ left:50%; top:46%; width:12cqh; height:20cqh; transform:translate(-50%, -50%); border-top:2px solid #fff; border-bottom:2px solid #fff; }
.g-bz-sight::before, .g-bz-sight::after{ content:''; position:absolute; left:50%; width:2px; height:34%; margin-left:-1px; background:#fff; box-shadow:0 0 .4cqh #fff; }
.g-bz-sight::before{ top:0; }
.g-bz-sight::after{ bottom:0; }
.g-bz-radar{
  left:50%; top:calc(var(--headH, 64px) + 6cqh); height:13cqh; aspect-ratio:1; transform:translateX(-50%);
  border:2px solid #fff; border-radius:50%; box-shadow:0 0 .5cqh #fff;
}
.g-bz-radar::before{ content:''; position:absolute; inset:0; border-radius:50%; background:conic-gradient(rgba(255,255,255,.7), transparent 18%); animation:g-spin 2.6s linear infinite; }
.g-bz-radar::after{ content:''; position:absolute; left:62%; top:30%; width:.6cqh; height:.6cqh; background:#fff; animation:g-blink 1.3s steps(1) infinite; }
.g-bz-gel{ inset:0; z-index:6; mix-blend-mode:multiply; background:linear-gradient(180deg, #ff3a3a 0 34%, #3aff4a 34% 100%); }

/* ---- Zaxxon (Sega, 1982): isometric fortress scrolling under the fighter ---- */
.g-zx-floor{
  inset:0; background:var(--ga-zxWall) 0 0/1024px 512px, var(--ga-zxFloor) 0 0/64px 32px, #141b4e;
  animation:g-zx-scroll 16.8s linear infinite;
}
@keyframes g-zx-scroll{ to{ background-position:-1024px 512px, -1024px 512px; } }
.g-zx-shadow{ left:43%; top:66%; width:10cqh; height:3cqh; border-radius:50%; background:rgba(0,0,0,.6); animation:g-zx-shade 7s ease-in-out infinite; }
@keyframes g-zx-shade{ 0%, 100%{ transform:scale(1); } 50%{ transform:scale(.7); } }
.g-zx-ship{ left:42%; top:44%; height:6cqh; aspect-ratio:2.57; background:var(--ga-zxShip) 0 0/100% 100% no-repeat; animation:g-zx-fly 7s ease-in-out infinite; }
@keyframes g-zx-fly{ 0%, 100%{ top:44%; } 50%{ top:30%; } }
.g-zx-ship > i{
  left:100%; top:40%; width:3cqh; height:.6cqh; background:#ff3030; box-shadow:0 0 .6cqh #ff3030;
  transform:rotate(-26.565deg); animation:g-zx-laser .7s linear infinite;
}
.g-zx-ship > i + i{ animation-delay:-.35s; }
@keyframes g-zx-laser{ 0%{ translate:0 0; opacity:1; } 90%{ translate:40cqh -20cqh; opacity:1; } 100%{ translate:40cqh -20cqh; opacity:0; } }
.g-zx-alt{
  left:4cqw; top:28%; width:2.4cqh; height:44cqh; border:2px solid #fff;
  background:repeating-linear-gradient(180deg, transparent 0 9%, rgba(255,255,255,.5) 9% 10%);
}
.g-zx-alt > i{ left:-60%; width:220%; height:3%; background:#ff3030; animation:g-zx-altm 7s ease-in-out infinite; }
@keyframes g-zx-altm{ 0%, 100%{ top:70%; } 50%{ top:30%; } }
.g-zx-fuel{ left:12cqw; bottom:6%; width:28cqw; height:2.6cqh; border:2px solid #fff; }
.g-zx-fuel > i{ left:0; top:0; bottom:0; width:90%; background:#ff9a20; animation:g-zx-fuel 20s linear infinite; }
@keyframes g-zx-fuel{ from{ width:90%; } to{ width:20%; } }
.g-zx-fuel::before{
  content:'FUEL'; position:absolute; right:100%; top:50%; margin-right:1cqw; transform:translateY(-50%);
  color:#fff; font:700 1.6cqh ui-monospace, monospace; letter-spacing:.2em;
}

/* ---- Q*bert (Gottlieb, 1982): hop down the pyramid, tops change colour ---- */
.g-qbert{ --hud:#ff8a00; --ar:1.2727; }
.g-qbert .g-board{ top:58%; height:min(68cqh, calc(84cqw / var(--ar))); }
.g-qb-pyr{ inset:0; background:var(--ga-qbPyramid) 0 0/100% 100% no-repeat; }
.g-qb-path{ inset:0; background:var(--ga-qbPath) 0 0/100% 100% no-repeat; clip-path:inset(0 0 100% 0); animation:g-qb-reveal 9s steps(1, end) infinite; }
@keyframes g-qb-reveal{
  0%{ clip-path:inset(0 0 100% 0); } 3%{ clip-path:inset(0 0 90.91% 0); } 13%{ clip-path:inset(0 0 77.27% 0); }
  23%{ clip-path:inset(0 0 63.64% 0); } 33%{ clip-path:inset(0 0 50% 0); } 43%{ clip-path:inset(0 0 36.36% 0); }
  53%{ clip-path:inset(0 0 22.73% 0); } 63%{ clip-path:inset(0 0 9.09% 0); } 94%, 100%{ clip-path:inset(0 0 100% 0); }
}
.g-qb-q{ left:46.43%; top:-4.55%; width:7.14%; height:9.09%; background:var(--ga-qbQbert) 0 0/100% 100% no-repeat; animation:g-qb-hop 9s infinite; }
@keyframes g-qb-hop{
  0%, 3%{ left:46.43%; top:-4.55%; opacity:1; } 8%{ left:50%; top:-9%; } 13%{ left:53.57%; top:9.09%; }
  18%{ left:50%; top:4%; } 23%{ left:46.43%; top:22.73%; } 28%{ left:50%; top:18%; } 33%{ left:53.57%; top:36.36%; }
  38%{ left:50%; top:31%; } 43%{ left:46.43%; top:50%; } 48%{ left:50%; top:45%; } 53%{ left:53.57%; top:63.64%; }
  58%{ left:50%; top:58%; } 63%, 90%{ left:46.43%; top:77.27%; opacity:1; }
  93%, 97%{ left:46.43%; top:77.27%; opacity:0; } 98%{ left:46.43%; top:-4.55%; opacity:0; } 100%{ left:46.43%; top:-4.55%; opacity:1; }
}
.g-qb-ball{
  left:47.77%; top:-14%; width:4.46%; height:5.68%; border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #ffb0b0 0 15%, #f01010 45%, #700 100%);
  animation:g-qb-ball 7s -3s infinite;
}
@keyframes g-qb-ball{
  0%{ left:47.77%; top:-14%; opacity:1; } 8%{ top:-1.14%; } 14%{ left:44.2%; top:-5%; } 20%{ left:40.63%; top:12.5%; }
  26%{ left:37%; top:8%; } 32%{ left:33.48%; top:26.14%; } 38%{ left:29.9%; top:22%; } 44%{ left:26.34%; top:39.77%; }
  50%{ left:22.8%; top:35%; } 56%{ left:19.2%; top:53.41%; } 62%{ left:15.6%; top:49%; } 68%{ left:12.05%; top:67.05%; }
  74%{ left:8.5%; top:63%; } 80%{ left:4.91%; top:80.68%; } 86%{ left:1.3%; top:77%; }
  96%{ left:-2%; top:120%; opacity:1; } 100%{ left:-2%; top:120%; opacity:0; }
}
.g-qb-disc{ top:57%; width:6.5%; height:3.4%; border-radius:50%; box-shadow:0 0 .6cqh rgba(255,255,255,.4); animation:g-qb-disc .36s steps(1) infinite; }
@keyframes g-qb-disc{ 0%{ background:#ff2a2a; } 25%{ background:#ffe020; } 50%{ background:#28e028; } 75%{ background:#2c5cff; } }

/* ---- Frogger (Konami, 1981): river, purple medians, traffic lanes ---- */
.g-frogger{ --ar:1.0769; }
.g-fg-lane{ left:0; width:100%; top:calc(var(--r) * 7.6923%); height:7.6923%; overflow:hidden; background:#000 0 0/100% 100% no-repeat; }
.g-fg-lane.w{ background-color:#000047; }
.g-fg-lane.m{ background:radial-gradient(circle, #c070ff 0 22%, transparent 26%) 0 0/3.57% 50%, #7a00b8; }
.g-fg-lane > i{ left:0; top:0; width:200%; height:100%; background-repeat:repeat-x; animation:g-fg-l var(--t) linear infinite; }
.g-fg-lane > i.rev{ animation-name:g-fg-r; }
.g-fg-lane.dive > i{ animation:g-fg-r var(--t) linear infinite, g-fg-dive 6s steps(1) infinite; }
@keyframes g-fg-l{ to{ transform:translateX(-50%); } }
@keyframes g-fg-r{ from{ transform:translateX(-50%); } to{ transform:translateX(0); } }
@keyframes g-fg-dive{ 0%, 55%{ opacity:1; } 60%{ opacity:.55; } 70%{ opacity:0; } 85%{ opacity:.55; } 92%{ opacity:1; } }
.g-fg-frog{
  left:46.4%; top:92.31%; width:6.25%; height:7.69%; z-index:2; background:var(--ga-fgFrog) 50% 50%/88% 88% no-repeat;
  animation:g-fg-hop 9s steps(1, end) infinite;
}
@keyframes g-fg-hop{
  0%{ top:92.31%; } 10%{ top:84.62%; } 18%{ top:76.92%; } 26%{ top:69.23%; } 34%{ top:61.54%; }
  42%{ top:53.85%; } 50%, 96%{ top:46.15%; } 100%{ top:92.31%; }
}
.g-fg-time{ right:14%; top:101.5%; height:3%; width:60%; background:#28e028; animation:g-fg-time 30s linear infinite; }
.g-fg-time::after{
  content:'TIME'; position:absolute; left:100%; top:50%; margin-left:1.5cqw; transform:translateY(-50%);
  color:#ffe020; font:700 2cqh ui-monospace, monospace; letter-spacing:.2em;
}
@keyframes g-fg-time{ from{ width:60%; } to{ width:4%; } }

/* ---- Missile Command (Atari, 1980): ICBM trails, flashing interceptions ---- */
.g-missile{ --hud:#ff3030; }
.g-mc-ground{ left:0; right:0; bottom:0; height:16cqh; background:var(--ga-mcGround) 0 0/100% 100% no-repeat; }
.g-mc-t{
  left:var(--x); top:var(--y); width:0; height:2px; background:var(--c, #ff2a2a);
  transform-origin:0 50%; transform:rotate(var(--a));
  animation:g-mc-trail 7s linear infinite; animation-delay:var(--d, 0s);
}
.g-mc-t.up{ --c:#3c5cff; animation-name:g-mc-up; }
@keyframes g-mc-trail{ 0%{ width:0; opacity:1; } 70%{ width:var(--l); opacity:1; } 92%{ width:var(--l); opacity:1; } 100%{ width:var(--l); opacity:0; } }
@keyframes g-mc-up{ 0%, 52%{ width:0; opacity:1; } 70%{ width:var(--l); } 92%{ width:var(--l); opacity:1; } 100%{ width:var(--l); opacity:0; } }
.g-mc-t > b{ right:-2px; top:-1px; width:4px; height:4px; background:#fff; animation:g-mc-tip 7s steps(1) infinite; animation-delay:var(--d, 0s); }
@keyframes g-mc-tip{ 0%{ opacity:1; } 70%, 100%{ opacity:0; } }
.g-mc-t > u{
  right:0; top:50%; width:var(--e, 9cqh); aspect-ratio:1; border-radius:50%; translate:50% -50%; transform:scale(0);
  animation:g-mc-boom 7s linear infinite, g-mc-flash .16s steps(1) infinite; animation-delay:var(--d, 0s), 0s;
}
@keyframes g-mc-boom{ 0%, 70%{ transform:scale(0); } 77%{ transform:scale(1); } 86%{ transform:scale(1); } 93%, 100%{ transform:scale(0); } }
@keyframes g-mc-flash{ 0%{ background:#fff; } 20%{ background:#ffff00; } 40%{ background:#ff40ff; } 60%{ background:#00ffff; } 80%{ background:#ff3030; } }
.g-mc-cursor{ left:34%; top:44%; width:3cqh; height:3cqh; animation:g-mc-aim 7s steps(1) infinite; }
.g-mc-cursor::before, .g-mc-cursor::after{ content:''; position:absolute; background:#3c5cff; }
.g-mc-cursor::before{ left:50%; top:0; bottom:0; width:2px; margin-left:-1px; }
.g-mc-cursor::after{ top:50%; left:0; right:0; height:2px; margin-top:-1px; }
@keyframes g-mc-aim{ 0%{ left:34%; top:44%; } 30%{ left:52%; top:30%; } 60%{ left:70%; top:48%; } }

/* ---- Dig Dug (Namco, 1982): strata, tunnels being dug, Pooka & Fygar ---- */
.g-dd-dirt{
  left:0; right:0; top:20%; bottom:0;
  background:
    radial-gradient(circle, rgba(0,0,0,.35) 0 16%, transparent 20%) 0 0/1.4cqh 1.4cqh,
    linear-gradient(180deg, #f2b02a 0 25%, #e0700e 25% 50%, #c23a16 50% 75%, #8a1408 75% 100%);
}
.g-dd-tun{ height:7cqh; background:#000; }
.g-dd-tun.v{ width:7cqh; }
.g-dd-dig{ left:12%; top:52%; height:7cqh; width:0; background:#000; animation:g-dd-dig 14s linear infinite; }
@keyframes g-dd-dig{ 0%{ width:0; } 85%, 100%{ width:60%; } }
.g-dd-hero{
  left:calc(12% - 8.6cqh); top:52%; height:7cqh; aspect-ratio:1.23; background:var(--ga-ddDig) 0 0/200% 100% no-repeat;
  animation:g-dd-walk 14s linear infinite, g-f2 .3s steps(1) infinite;
}
@keyframes g-dd-walk{ 0%{ left:calc(12% - 8.6cqh); } 85%, 100%{ left:calc(72% - 8.6cqh); } }
.g-dd-pooka{
  left:8%; top:72%; height:7cqh; aspect-ratio:1.23; background:var(--ga-ddPooka) 0 0/200% 100% no-repeat;
  animation:g-dd-patrol 6s ease-in-out infinite alternate, g-f2 .35s steps(1) infinite;
}
@keyframes g-dd-patrol{ from{ left:8%; } to{ left:calc(56% - 8.6cqh); } }
.g-dd-fygar{ left:57%; top:34%; height:7cqh; aspect-ratio:1.23; background:var(--ga-ddFygar) 0 0/100% 100% no-repeat; animation:g-dd-fpatrol 5s ease-in-out infinite alternate; }
@keyframes g-dd-fpatrol{ from{ left:57%; } to{ left:calc(86% - 8.6cqh); } }
.g-dd-rock{ height:6cqh; aspect-ratio:1.33; background:var(--ga-ddRock) 0 0/100% 100% no-repeat; }
.g-dd-flower{ top:calc(20% - 5cqh); height:5cqh; aspect-ratio:.78; background:var(--ga-ddFlower) 0 0/100% 100% no-repeat; }
