/* Compact full-art catalogue cards. All imagery belongs to Softframeworks. */
.game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 12px;
}
.game-shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 6);
  grid-template-rows: 1fr;
  gap: 12px;
  padding: 3px 2px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 60px) / 6); }
.game-card[data-card-layout="portrait"] {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #2b163d;
  box-shadow: 0 5px 15px #0d061a26;
  scroll-snap-align: start;
  transition: box-shadow 180ms ease;
}
.game-card[data-card-layout="portrait"]:is(:hover, :focus-within) {
  border: 0;
  box-shadow: 0 0 0 1px #be9de7, 0 7px 22px #1a0a3044;
}
.game-card .game-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  border: 0;
  border-radius: inherit;
  background: #2b163d;
  box-shadow: none;
}
.game-card .game-cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.game-card .card-art-link::after {
  z-index: 1;
  inset: 54% 0 0;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(transparent, #17071e36 30%, #17071ed9);
  pointer-events: none;
}
.game-card .game-title {
  position: absolute;
  z-index: 3;
  inset: auto 8px 52px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(1rem, 1.45vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  text-align: center;
  text-wrap: balance;
  color: #ffe69f;
  -webkit-text-stroke: .35px #7b3a30;
  text-shadow: 0 -1px #fff5d1, 0 1px #ba6e34, 0 2px #9c442d, 0 3px #682338, 0 4px #451b3c, 0 6px 8px #12031c;
}
.game-title > a { display: block; padding: 3px 0; border-radius: 5px; }
.game-card .game-favourite {
  z-index: 5;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.game-card .game-favourite > img { width: 26px; height: 26px; filter: grayscale(.75) brightness(1.2) drop-shadow(0 2px 2px #210c3888); }
.game-card .game-favourite[aria-pressed="true"] { background: #2d123a99; }
.game-card .game-favourite[aria-pressed="true"] > img { filter: drop-shadow(0 1px 4px #ff8fbc77); }
.card-guest {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 9px;
  padding: 2px 6px;
  border: 1px solid #ddf8f080;
  border-radius: 5px;
  background: #70ead9ed;
  color: #12323a;
  font-size: .75rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .03em;
  pointer-events: none;
}
.card-hover {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: #180c2a00;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, background-color 180ms ease;
}
.card-play {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #fae6c4;
  border-radius: 50%;
  background: var(--button-gradient);
  color: #291234;
  box-shadow: inset 0 1px #ffffffad, 0 5px 20px #10051e88;
}
.card-play > svg { width: 26px; height: 26px; fill: currentColor; }
.game-card:is(:hover, :focus-within) .card-hover { opacity: 1; background: #180c2a3b; }
.card-entry {
  position: absolute;
  z-index: 3;
  bottom: 5px;
  left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 40px;
  min-height: 44px;
  padding: 0 3px;
  font-size: .875rem;
  font-weight: 850;
  color: #fff1db;
  text-shadow: 0 2px 3px #180923;
}
.card-entry > svg { width: 14px; height: 14px; fill: currentColor; }
.game-preview {
  position: absolute;
  z-index: 5;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: #fff5ff;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.preview-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #f4d7f570;
  border-radius: 100px;
  background: linear-gradient(110deg, #352049dc, #3f2840dc 45%, #23464bdc);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px #fff1, 0 2px 5px #0003;
  line-height: 1.2;
}
.preview-pill > svg { width: 14px; height: 14px; flex: 0 0 14px; }
.game-preview:hover .preview-pill { border-color: #e5d1ff; background: #673b82ed; }
.game-card :is(a, button):focus-visible { outline: 3px solid #ffe0a7; outline-offset: -3px; }
.game-card .game-title a:focus-visible { outline-offset: 2px; }
.game-preview-queue { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* A dense shelf can be narrower than its surrounding viewport. */
@container (max-width: 150px) {
  .game-preview { min-width: 44px; }
  .preview-pill { padding: 7px; }
  .preview-pill > span, .card-entry > span { display: none; }
  .card-entry { left: 4px; width: 32px; min-width: 32px; }
  .card-entry > svg { width: 18px; height: 18px; }
  .game-card .game-title { font-size: 1rem; left: 6px; right: 6px; bottom: 49px; }
}

@media (min-width: 1301px) {
  .game-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .game-shelf, .world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 72px) / 7); }
}
@media (min-width: 1700px) {
  .game-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .game-shelf, .world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 84px) / 8); }
}
@media (min-width: 801px) and (max-width: 1023px) {
  .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .game-shelf, .world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 48px) / 5); }
  .game-card .game-title { font-size: 1rem; }
  .card-entry > span { display: none; }
}
@media (min-width: 561px) and (max-width: 800px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-shelf, .world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 36px) / 4); }
  .game-card .game-title { font-size: 1.1rem; }
}
@media (max-width: 560px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .game-shelf, .world-shelf:first-of-type .game-shelf { grid-auto-columns: calc((100% - 20px) / 2.25); gap: 10px; }
  .game-card[data-card-layout="portrait"] { border-radius: 12px; }
  .game-card .game-title { font-size: clamp(1rem, 4.3vw, 1.35rem); }
  .game-preview { right: 4px; }
  .preview-pill { padding: 6px; }
  .card-entry { left: 3px; }
  .card-guest { top: 10px; left: 7px; font-size: .75rem; }
}
@media (max-width: 380px) {
  .card-entry > span { display: none; }
  .card-entry { left: 4px; width: 30px; min-width: 30px; }
  .card-entry > svg { width: 18px; height: 18px; }
}
@media (hover: none), (pointer: coarse) {
  .card-hover { opacity: 1; background: transparent; }
  .card-play { width: 42px; height: 42px; background: #381c46b8; color: #fff4df; border-color: #fff0ceaa; backdrop-filter: blur(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .game-card[data-card-layout="portrait"], .card-hover { transition: none; }
}
@media (forced-colors: active) {
  .game-card[data-card-layout="portrait"] { border: 1px solid ButtonText; }
  .preview-pill, .card-play { background: Canvas; color: ButtonText; border: 1px solid ButtonText; }
  .game-card .game-title { color: CanvasText; -webkit-text-stroke: 0; text-shadow: none; }
  .card-entry { color: LinkText; text-shadow: none; }
}
