.game-collection { container-type: inline-size; min-width: 0; isolation: isolate; }

.game-theatre {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0b0d10;
}
.game-colour {
  position: absolute;
  z-index: -2;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  opacity: .48;
  filter: blur(34px) saturate(.72);
}
.game-theatre::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #020408c9 0, #02030533 42%, #090b1059 73%, #090b0f 100%);
}
.game-rack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 8% 2%;
  list-style: none;
}
.game-slot { min-width: 0; }
.game-case {
  display: block;
  position: relative;
  width: 100%;
  border: 0;
  padding: 3px 3px 3px 5px;
  border-radius: 3px;
  background: linear-gradient(105deg, #a7a9ad, #34383d 7%, #111317 72%, #53575c 100%);
  box-shadow: inset 0 1px #d3d3d469, 1px 4px 9px #0008;
  color: white;
  cursor: pointer;
}
.game-case::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 2px;
  width: 1px;
  background: #b6bcc16b;
}
.game-case img { display: block; width: 100%; height: auto; }
.game-collection.enhanced .game-theatre { touch-action: pan-y pinch-zoom; }
.game-collection.enhanced .game-rack {
  display: block;
  padding: 0;
  height: clamp(245px, 49cqi, 570px);
  user-select: none;
}
.enhanced .game-slot {
  --offset: 0cqi;
  --yaw: 0deg;
  --scale: 1;
  --brightness: 1;
  position: absolute;
  bottom: 17%;
  left: 50%;
  width: max-content;
  max-width: 48cqi;
  z-index: 3;
  transform: translateX(calc(-50% + var(--offset))) perspective(850px) rotateY(var(--yaw)) scale(var(--scale));
  transform-origin: 50% 90%;
}
.enhanced .game-slot[data-distance="-1"] { --offset: -26cqi; --yaw: 36deg; }
.enhanced .game-slot[data-distance="1"] { --offset: 26cqi; --yaw: -36deg; }
.enhanced .game-slot[data-distance="-2"] { --offset: -43cqi; --yaw: 58deg; }
.enhanced .game-slot[data-distance="2"] { --offset: 43cqi; --yaw: -58deg; }
.enhanced .game-slot:is([data-distance="-1"], [data-distance="1"]) { --scale: .79; --brightness: .72; z-index: 2; }
.enhanced .game-slot:is([data-distance="-2"], [data-distance="2"]) { --scale: .63; --brightness: .48; z-index: 1; }
.enhanced .game-case { width: fit-content; max-width: 100%; filter: brightness(var(--brightness)); }
.enhanced .game-case img {
  width: auto;
  height: auto;
  max-height: clamp(152px, 31cqi, 370px);
  max-width: 100%;
}
.enhanced .game-slot {
  -webkit-box-reflect: below 1px linear-gradient(transparent 75%, #0003);
}
.game-case:focus-visible, .game-step:focus-visible { outline: 2px solid #eef3f5; outline-offset: 4px; }
.game-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 8px; }
.game-counter { font-size: 13px; letter-spacing: .07em; font-variant-numeric: tabular-nums; color: #3f453c; }
.game-step {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  color: #242821;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.game-step::before {
  content: "";
  width: 10px; height: 10px;
  border-top: 2px solid;
  border-right: 2px solid;
  transform: rotate(45deg);
}
.game-prev::before { transform: rotate(-135deg); }
.game-step:hover { color: #0b0d09; background: #00000013; border-radius: 50%; }
.game-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (prefers-reduced-motion: no-preference) {
  .enhanced .game-slot { transition: transform 420ms cubic-bezier(.2,.75,.25,1); }
  .enhanced .game-case { transition: filter 260ms; }
}

.game-step:focus-visible, .clip-toggle:focus-visible { outline-color: #171916; }
.game-film { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; background: #070907; object-fit: contain; }
.game-theatre.showing-clip { clip-path: none; }
.showing-clip .game-rack { visibility: hidden; }
.clip-toggle {
  display: block; margin: 4px auto 0; min-height: 44px; padding: 0 16px;
  color: #f3f4ef; background: #252923; border: 0; border-radius: 3px; cursor: pointer;
}
