/* Home page: each game shown on a black tablet, its screen a picture of that game's table halfway
   through a game (tables/<id>-c.webp / -v.webp, made by tools/shoot-tables.mjs). Sized with --s like
   the old boxes: the tablet is about 1.45 × --s wide. The stage gives the perspective. */
.box-stage { --s: 120px; perspective: 900px; perspective-origin: 30% 20%; }
.tablet {
  --w: calc(var(--s) * 1.45); --h: calc(var(--s) * .86); --bz: max(2px, calc(var(--s) * .022));
  position: relative; width: var(--w); height: var(--h); box-sizing: border-box; padding: var(--bz);
  border-radius: calc(var(--s) * .06);
  background: linear-gradient(145deg, #26262b, #0b0b0d 50%, #17171b);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),                                    /* glass edge */
    0 0 0 max(1px, calc(var(--s) * .008)) #2e2e34,                               /* metal band */
    calc(var(--s) * .018) calc(var(--s) * .026) 0 calc(var(--s) * .008) #050506, /* its thickness */
    0 calc(var(--s) * .08) calc(var(--s) * .16) rgba(0, 0, 0, .55);
  transform: rotateX(12deg) rotateY(-20deg) rotateZ(1deg);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.tablet .tb-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--s) * .04);
  background: #0b0b0d;
}
.tablet .tb-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* light on the glass */
.tablet .tb-screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04) 32%, transparent 33%, transparent 70%, rgba(255, 255, 255, .05));
}
/* the backup when a picture is missing: the game's cover art fills the screen */
.tablet .tb-screen > svg { display: block; width: 100%; height: 100%; }
