.related-games {
  box-sizing: border-box;
  width: min(100% - 32px, 740px);
  margin: 20px auto;
  padding: 14px;
  border: 1px solid #c9d7e2;
  border-radius: 12px;
  background: #f6f9fc;
  color: #192d40;
  font: 14px/1.4 system-ui, sans-serif;
}
.related-games__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 10px;
}
.related-games__heading h2 { margin: 0; color: inherit; font: bold 16px/1.4 system-ui, sans-serif; }
.related-games__heading a { color: #285675; text-decoration: underline; }
.related-games__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.related-games__cards a {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dce5ed;
  border-radius: 8px;
  background: #fff;
  color: #192d40;
  text-decoration: none;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.related-games__cards a:hover { border-color: #285675; text-decoration: underline; }
.related-games a:focus-visible { outline: 2px solid #285675; outline-offset: 2px; }
.related-games__cards img {
  display: block;
  width: 72px;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 4px;
}
body:has(> .game-standalone + .related-games) { margin: 0; }
.game-standalone:has(+ .related-games) { position: relative; height: 100svh; }

.home-play-area > .related-games {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #edf6ff;
}
.home-play-area .related-games__heading {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #294156;
}
.home-play-area .related-games__heading a {
  color: #a9c5db;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.home-play-area .related-games__heading a:hover { text-decoration: underline; }
.home-play-area .related-games__cards { gap: 12px; }
.home-play-area .related-games__cards a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #294156;
  border-radius: 9px;
  background: #102437;
  color: #edf6ff;
  font-size: 13px;
  transition: border-color .16s ease, background-color .16s ease;
}
.home-play-area .related-games__cards img {
  width: 100%;
  border-radius: 0;
}
.home-play-area .related-games__cards span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 11px;
}
.home-play-area .related-games__cards span::after {
  content: "";
  flex: 0 0 5px;
  height: 5px;
  border-top: 1px solid #79cbe9;
  border-right: 1px solid #79cbe9;
  transform: rotate(45deg);
}
.home-play-area .related-games__cards a:hover {
  border-color: #79cbe9;
  background: #17334a;
  text-decoration: none;
}
.home-play-area .related-games a:focus-visible { outline-color: #79cbe9; }

@media (min-width: 1024px) {
  .home-play-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(224px, 19vw, 280px);
    align-items: start;
  }
  .home-play-area > .related-games {
    width: 100%;
    margin: 0;
    padding: 82px 16px 20px;
  }
  .home-play-area .related-games__cards { grid-template-columns: minmax(0, 1fr); }
}

/* Compact recommendations below the game on detail pages. */
.related-games:not(.home-play-area *) {
  width: min(calc(100% - 32px), 640px);
  margin: 14px auto 20px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid #dce5ed;
  border-radius: 0;
  background: transparent;
}
.related-games:not(.home-play-area *) .related-games__heading { margin-bottom: 6px; }
.related-games:not(.home-play-area *) .related-games__heading h2 { font-size: 14px; }
.related-games:not(.home-play-area *) .related-games__heading a { font-size: 12px; }
.related-games:not(.home-play-area *) .related-games__cards a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 44px;
  box-sizing: border-box;
  padding: 5px 8px;
  font-size: 13px;
}
.related-games:not(.home-play-area *) .related-games__cards img {
  width: 48px;
  height: 26px;
}
@media (max-width: 520px) {
  .related-games:not(.home-play-area *) .related-games__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
}
