:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  --bg: #070e18;
  --panel: #0c1726;
  --panel2: #122137;
  --text: #f3f7ff;
  --muted: #9aaecb;
  --line: #22334b;
  --blue: #2189ff;
  --accent: #ff2858;
  --soft: #14243a;
  --shadow: 0 10px 30px #0002;
  background: var(--bg);
  color: var(--text);
}

body[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: #fff;
  --panel2: #f2f6fc;
  --text: #162337;
  --muted: #63758d;
  --line: #dbe3ef;
  --soft: #eef3fa;
  --shadow: 0 8px 24px #1d385214;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 21px;
}

.icon-btn:hover,
.nav-item:hover {
  background: var(--soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 750;
  white-space: nowrap;
  letter-spacing: -0.6px;
}

.brand-icon {
  background: #fa1644;
  color: #fff;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 14px;
}

.brand-icon--logo {
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
}

.brand-icon--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Keep configured site logos inside the brand mark even if global image rules change. */
.topbar .brand-icon.brand-icon--logo {
  display: inline-flex;
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  max-height: 34px;
  padding: 0;
  overflow: hidden;
}

.topbar .brand-icon.brand-icon--logo img {
  display: block;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  max-height: 34px;
  object-fit: contain;
}

.search {
  display: flex;
  margin: auto;
  width: min(620px, 48vw);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
  padding: 0 19px;
}

.search button {
  width: 58px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  font-size: 26px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2475ff, #3ecdd5);
  font-size: 12px;
  font-weight: 800;
  color: white;
}

.shell {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 214px;
  flex: none;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  background: var(--panel);
  transition: width 0.2s;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 14px;
  white-space: nowrap;
}

.nav-item.active {
  background: var(--soft);
  font-weight: 750;
  color: var(--blue);
}

.nav-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(260px, calc(100vw - 24px));
  padding: 7px 10px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel2);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
}

.nav-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  font-size: 20px;
}

.nav-divider {
  border-top: 1px solid var(--line);
  margin: 12px 5px;
}

.nav-label {
  font-size: 11px;
  color: var(--muted);
  padding: 0 13px;
  letter-spacing: 1px;
}

.content {
  flex: 1;
  min-width: 0;
  max-width: 1800px;
  margin: 0 auto;
  padding: 22px 26px 60px;
}

body[data-menu="compact"] .sidebar {
  width: 72px;
}

body[data-menu="compact"] .nav-item {
  justify-content: center;
  padding: 0;
}

body[data-menu="compact"] .nav-text,
body[data-menu="compact"] .nav-label,
body[data-menu="compact"] .nav-divider {
  display: none;
}

.detail-layout,
.trending-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(285px, 340px);
  gap: 20px;
}

.trend-week-list {
  display: grid;
  gap: 9px;
}

.trend-week-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.trend-week-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.trend-week-item.is-active {
  border-color: var(--accent);
  background: var(--soft);
}

.trend-week-date {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.trend-week-copy {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.trend-week-copy strong {
  font-size: 13px;
}

.trend-week-copy small {
  color: var(--muted);
  font-size: 11px;
}

.trend-week-check,
.trend-week-arrow {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.trend-week-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-main,
.detail-aside,
.trend-aside {
  min-width: 0;
}

.detail-aside,
.trend-aside {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.crumb {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.crumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* margin: 0 0 14px */
}

.crumb span {
  margin: 0 8px;
}

.player {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #000;
}

.player > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player > img.player-backdrop {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  filter: blur(8px) brightness(0.48);
  transform: scale(1.03);
}

.player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.player-prompt {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
  text-align: center;
}

.player-prompt__cover {
  width: min(160px, 42vw);
  /* aspect-ratio: 16 / 10; */
  object-fit: cover;
  border: 1px solid #ffffff70;
  border-radius: 10px;
  box-shadow: 0 8px 26px #0009;
}

.player-prompt__title {
  margin: 0;
  color: #fff;
  font-size: 23px;
  line-height: 1.25;
  text-shadow: 0 2px 5px #0009;
}

.player-label {
  position: absolute;
  left: 14px;
  top: 14px;
  background: #06111ecf;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

.play-btn {
  min-width: 110px;
  background: #ff3b1f;
  border: 1px solid #ff684e;
  border-radius: 16px;
  color: #fff;
  font-size: 19px;
  font-weight: 750;
  padding: 12px 28px;
  box-shadow: 0 6px 22px #ff391d70;
  cursor: pointer;
}

.play-btn:hover {
  background: #e92e14;
}

@media (max-width: 600px) {
  .player-shade {
    padding: 10px;
  }

  .player-prompt {
    gap: 8px;
  }

  .player-prompt__cover {
    width: min(92px, 24vw);
    max-height: 92px;
  }

  .player-prompt__title {
    font-size: 18px;
    line-height: 1.15;
  }

  .play-btn {
    min-width: 96px;
    border-radius: 13px;
    font-size: 16px;
    padding: 8px 22px;
  }
}

.player-hint {
  font-size: 12px;
  color: #eee;
}

.crumb-fullscreen {
  flex: 0 0 auto;
  width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.crumb-fullscreen:hover {
  background: var(--soft);
}

.player-fullscreen-toolbar {
  display: none;
}

.fullscreen-escape-hint {
  display: none;
}

.game-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.game-heading > img {
  width: 78px;
  height: 78px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 13px;
  border: 1px solid var(--line);
}

.heading-copy {
  flex: 1;
  min-width: 0;
}

.heading-copy h1 {
  font-size: 27px;
  margin: 0 0 9px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips span,
.section-mark {
  background: var(--soft);
  border-radius: 20px;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
}

.chips small {
  font-size: 10px;
}

.heading-actions {
  display: flex;
  gap: 7px;
}

.soft-btn {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 9px;
}

.article-block,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 19px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.side-panel {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.section-heading h2 {
  font-size: 17px;
  margin: 0;
}

.article-block h3 {
  font-size: 15px;
  margin: 22px 0 7px;
}

.article-block p {
  line-height: 1.75;
  /* color: var(--muted); */
  color: var(--text);
  margin: 8px 0 12px;
}

.review-article p {
  color: var(--text);
}

.review-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.review-summary > div {
  padding: 14px;
  border-radius: 10px;
  background: var(--soft);
}

.review-summary strong {
  color: var(--text);
}

.review-summary p {
  font-size: 13px;
  margin-bottom: 0;
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  min-width: 0;
  width: 100%;
  cursor: pointer;
}

.review-outbound-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  text-align: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.source-row:focus-visible,
.review-outbound-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.source-row:hover,
.side-game:hover,
.trend-rank:hover {
  border-color: var(--blue);
  background: var(--soft);
}

.source-logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d70d4, #9a3be6);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.source-title {
  flex: 1;
  min-width: 0;
}

.source-title strong,
.source-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-title small {
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}

.source-metrics {
  text-align: right;
  white-space: nowrap;
}

.source-metrics small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.up,
.growth {
  color: #19c888 !important;
}

.down {
  color: #ff647c !important;
}

.arrow {
  color: var(--muted);
}

.side-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}

.side-game {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 5px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  color: var(--text);
  text-align: left;
  border-radius: 8px;
}

.side-game img,
.trend-rank img {
  width: 54px;
  height: 54px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
}

.side-game span:nth-child(2),
.trend-rank span {
  flex: 1;
  min-width: 0;
}

.side-game strong,
.side-game small,
.trend-rank strong,
.trend-rank small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-game small,
.trend-rank small {
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}

.compact .source-row {
  padding: 8px;
  gap: 7px;
}

.compact .source-logo {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.compact .source-metrics strong {
  font-size: 12px;
}

.compact .source-metrics small {
  font-size: 9px;
}

.related-grid,
.side-related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.side-related {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 0;
  min-width: 0;
}

.tile-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.tile-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  transition: transform 0.2s;
}

.game-tile:hover img {
  transform: scale(1.05);
}

.game-tile > strong {
  margin: 9px 0 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
  font-size: 13px;
}

.tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.text-btn {
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 12px;
}

.demo-note {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0;
}

.trending-intro {
  padding: 12px 0 23px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.5px;
  color: var(--blue);
}

.trending-intro h1,
.list-heading h1 {
  font-size: 30px;
  margin: 9px 0;
}

.trending-intro p,
.list-heading p {
  color: var(--muted);
  margin: 0 0 19px;
}

.periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.periods button,
.category-pills button {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 25px;
  padding: 9px 15px;
}

.periods button.on,
.category-pills button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 18px;
}

.rank-bubble {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 35px;
  height: 35px;
  padding: 6px 10px;
  border-radius: 0 0 13px 0;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}

.load-bar {
  text-align: center;
  margin: 18px 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
}

.load-bar > .discover-open {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
  font-size: 13px;
  line-height: 1.4;
}

.load-bar > .discover-open:hover {
  background: transparent;
  color: var(--text);
  text-decoration: underline;
}

.trend-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  color: var(--text);
  padding: 10px 0;
}

.trend-rank > b {
  font-size: 14px;
  color: var(--muted);
  width: 15px;
}

.trend-rank em {
  font-size: 11px;
  font-style: normal;
  color: #16c985;
  white-space: nowrap;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  color: var(--muted);
}

.stat-line strong {
  color: var(--text);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-heading {
  padding: 20px 0;
}

.list-heading h1 {
  font-size: 32px;
}

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 9px;
  z-index: 80;
  transition: transform 0.2s;
  box-shadow: var(--shadow);
}

#toast.show {
  transform: translateX(-50%) translateY(0);
}

.nav-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .detail-layout,
  .trending-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
  }

  .content {
    padding: 20px;
  }

  .trending-grid {
    gap: 18px 12px;
  }
}

@media (max-width: 950px) {
  .detail-layout,
  .trending-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside,
  .trend-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .detail-aside .side-panel:last-child {
    grid-column: 1/-1;
  }

  .trending-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .search {
    width: min(430px, 40vw);
  }
}

@media (max-width: 700px) {
  .topbar {
    gap: 9px;
    padding: 0 12px;
    height: 58px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-icon {
    padding: 6px;
  }

  .search {
    width: auto;
    flex: 1;
    height: 36px;
  }

  .search input {
    padding: 0 9px;
    font-size: 12px;
  }

  .search button {
    width: 34px;
  }

  .avatar {
    display: none;
  }

  .shell {
    min-height: calc(100vh - 58px);
  }

  .sidebar,
  body[data-menu="compact"] .sidebar {
    position: fixed;
    z-index: 40;
    top: 58px;
    bottom: 0;
    height: auto;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }

  .mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body[data-menu="compact"] .nav-text,
  body[data-menu="compact"] .nav-label,
  body[data-menu="compact"] .nav-divider {
    display: initial;
  }

  body[data-menu="compact"] .nav-item {
    justify-content: flex-start;
    padding: 0 14px;
  }

  .mobile-nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 58px 0 0;
    background: #0009;
    z-index: 35;
  }

  .content {
    padding: 13px;
  }

  .game-heading {
    flex-wrap: wrap;
  }

  .heading-actions {
    width: 100%;
  }

  .related-grid,
  .trending-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-aside,
  .trend-aside {
    display: flex;
  }

  .review-summary {
    grid-template-columns: 1fr;
  }

  .player-label {
    font-size: 10px;
  }

  .player-hint {
    font-size: 10px;
  }

  .play-btn {
    padding: 11px 22px;
  }

  .trending-intro h1 {
    font-size: 25px;
  }
}

@media (min-width: 1600px) {
  .detail-layout,
  .trending-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .content {
    padding: 24px 32px;
  }
}

/* V3 — editorial discovery pages; one stylesheet, square thumbnails */
.discover-open,
.discovery-title {
  font: inherit;
}

.discovery-page {
  /* max-width: 1540px;
	margin: auto */
}

.discovery-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0 30px;
}

.discovery-intro h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.15;
  letter-spacing: -1.4px;
  margin: 10px 0;
}

.discovery-intro p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.featured-section {
  margin: 0 0 33px;
}

.discovery-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.discovery-section-heading h2,
.discovery-section-heading .discovery-section-title {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin: 6px 0 0;
}

.subtle-copy {
  font-size: 12px;
  color: var(--muted);
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 15px;
}

.feature-card {
  position: relative;
  display: block;
  aspect-ratio: 1.5;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
  text-align: left;
  color: white;
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.feature-card:hover img {
  transform: scale(1.06);
}

.feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(1, 8, 18, 0.96),
    rgba(1, 8, 18, 0.45) 47%,
    transparent
  );
}

.feature-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feature-content small {
  font-size: 10px;
  letter-spacing: 1px;
  color: #8fcbff;
  font-weight: 800;
}

.feature-content strong {
  font-size: clamp(19px, 2vw, 28px);
  letter-spacing: -0.5px;
}

.feature-content > span {
  font-size: 12px;
  line-height: 1.45;
  color: #cbd6e8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-content b {
  font-size: 12px;
  color: #71baff;
  margin-top: 4px;
}

.catalog-section {
  margin-top: 8px;
}

.discovery-filters {
  margin: 0 0 20px;
}

.discovery-filters button {
  padding: 10px 17px;
}

.discovery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px;
}

.discovery-card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.discovery-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.discovery-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: var(--soft);
  overflow: hidden;
}

.discovery-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.discovery-card:hover .discovery-image img {
  transform: scale(1.035);
}

.image-chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: #07111fd9;
  color: white;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11px;
}

.discovery-body {
  padding: 14px;
}

.discovery-title {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 16px;
  font-weight: 750;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-title:hover {
  color: var(--blue);
}

.discovery-body p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  min-height: 38px;
  margin: 8px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discovery-stats {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.discovery-stats small {
  color: var(--muted);
  font-size: 10px;
}

.discovery-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.discover-open {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 8px 12px;
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
}

.discover-open:hover {
  background: transparent;
  color: var(--text);
  text-decoration: underline;
}

.mini-save {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  width: 36px;
  height: 36px;
  font-size: 21px;
}

.mini-save.saved {
  color: #ff4068;
}

.empty-discovery {
  text-align: center;
  padding: 75px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.empty-discovery > span {
  font-size: 46px;
  color: var(--accent);
}

.empty-discovery p {
  color: var(--muted);
}

.player:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
}

.player:fullscreen > img,
.player:fullscreen > iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player:fullscreen .player-fullscreen-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 9px 18px;
  border-top: 1px solid #ffffff18;
  background: rgba(16, 18, 29, 0.94);
  color: #f8fafc;
  backdrop-filter: blur(10px);
}

.player:fullscreen .fullscreen-escape-hint.show {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 12;
  display: block;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid #ffffff30;
  border-radius: 5px;
  background: rgba(24, 27, 37, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  box-shadow: 0 4px 16px #0008;
}

.fullscreen-game-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.fullscreen-site-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.fullscreen-site-brand img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.fullscreen-rating {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
}

.fullscreen-rating .rating__stars {
  font-size: 17px;
}

.fullscreen-rating [data-rating-value] {
  color: #fbbf24;
}

.fullscreen-rating [data-rating-count] {
  color: #aab8cc;
}

.fullscreen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fullscreen-actions .mini-save,
.fullscreen-actions .soft-btn,
.fullscreen-actions .fullscreen-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #ffffff14;
  border-radius: 50%;
  background: #272a3b;
  color: #fff;
  font-size: 18px;
}

.fullscreen-actions .mini-save.saved {
  color: #ff5578;
}

.fullscreen-actions button:hover {
  background: #3b4057;
}

.player iframe {
  position: absolute;
  inset: 0;
}

.player:fullscreen iframe {
  z-index: 1;
}

.player:fullscreen .fullscreen-btn {
  z-index: 11;
}

@media (max-width: 760px) {
  .player:fullscreen .player-fullscreen-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 8px 10px;
  }

  .player:fullscreen .fullscreen-site-brand {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .player:fullscreen .fullscreen-rating {
    grid-column: 1;
    grid-row: 3;
  }

  .player:fullscreen .fullscreen-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .fullscreen-actions {
    gap: 5px;
  }

  .fullscreen-actions .mini-save,
  .fullscreen-actions .soft-btn,
  .fullscreen-actions .fullscreen-btn {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 1200px) {
  .discovery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-layout {
    gap: 12px;
  }
}

@media (max-width: 850px) {
  .feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card:first-child {
    grid-column: 1/-1;
    aspect-ratio: 2.3;
  }

  .discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .discovery-intro {
    align-items: start;
    padding: 17px 0 23px;
  }

  .feature-layout {
    gap: 10px;
  }

  .feature-card:first-child {
    aspect-ratio: 1.6;
  }

  .feature-card:not(:first-child) {
    aspect-ratio: 1;
  }

  .feature-content {
    padding: 12px;
  }

  .feature-content strong {
    font-size: 18px;
  }

  .feature-content > span {
    display: none;
  }

  .discovery-grid {
    gap: 10px;
  }

  .discovery-body {
    padding: 10px;
  }

  .discovery-body p {
    min-height: 56px;
  }

  .discovery-stats {
    font-size: 10px;
  }

  .discovery-section-heading h2,
  .discovery-section-heading .discovery-section-title {
    font-size: 19px;
  }

  .subtle-copy {
    display: none;
  }

  .discovery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .discovery-filters button {
    flex: none;
  }
}

/* Featured thumbnails: always square, including first card and mobile layouts. */
.feature-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.feature-card,
.feature-card:first-child,
.feature-card:not(:first-child) {
  aspect-ratio: 1 / 1;
  grid-column: auto;
  min-width: 0;
}

.feature-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (max-width: 850px) {
  .feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card:first-child {
    grid-column: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 540px) {
  .feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card:first-child,
  .feature-card:not(:first-child) {
    aspect-ratio: 1 / 1;
  }
}

/* Review-first frontend adaptations. */
.content:focus {
  outline: none;
}

.feature-card {
  display: block;
}

.discovery-title {
  display: block;
}

.discover-open {
  display: inline-block;
}

.review-article p {
  font-size: 15px;
  line-height: 1.9;
}

.review-byline {
  font-size: 12px !important;
  color: var(--muted);
}

.review-stars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-stars button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 25px;
}

.review-stars button.selected,
.review-stars button:hover {
  color: #f6b843;
  border-color: #f6b843;
}

.game-facts {
  margin: 0;
}

.game-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.game-facts > div:last-child {
  border-bottom: 0;
}

.game-facts dt {
  color: var(--muted);
}

.game-facts dd {
  margin: 0;
  text-align: right;
}

.game-facts a {
  color: var(--blue);
}

.trend-caption {
  margin-top: 14px;
  line-height: 1.7;
}

.trend-period-note {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.rank-change {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
}

.rank-change > span:last-child {
  color: var(--muted);
}

.new-entry {
  color: var(--blue);
  font-weight: 700;
}

.side-caption {
  line-height: 1.7;
}

.demo-note {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  line-height: 1.7;
}

.source-title small {
  white-space: normal;
  line-height: 1.6;
}

#toast {
  max-width: calc(100vw - 30px);
  width: max-content;
  text-align: center;
}

@media (max-width: 540px) {
  .topbar {
    flex-wrap: wrap;
    height: 108px;
    min-height: 108px;
    gap: 8px;
    padding: 9px 12px;
  }

  .topbar .search {
    order: 4;
    flex-basis: 100%;
    width: 100%;
    margin: 0;
  }

  .topbar #themeBtn {
    margin-left: auto;
  }

  .sidebar,
  body[data-menu="compact"] .sidebar {
    top: 108px;
  }

  .mobile-nav-open .nav-backdrop {
    inset: 108px 0 0;
  }

  .shell {
    min-height: calc(100vh - 108px);
  }

  .game-heading > img {
    width: 64px;
    height: 64px;
  }

  .heading-copy h1 {
    font-size: 23px;
  }

  .section-mark {
    flex: none;
  }

  .tile-meta {
    flex-wrap: wrap;
    white-space: normal;
  }
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 100;
  background: var(--panel);
  color: var(--text);
  padding: 12px 18px;
  border: 1px solid var(--blue);
  border-radius: 8px;
}

.skip-link:focus {
  top: 8px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.site-footer a:hover,
.review-article a,
.policy-page a {
  color: var(--blue);
}

.policy-page {
  /* max-width: 1000px;
	margin: 15px auto */
}

.policy-page p,
.policy-page li {
  line-height: 1.9;
  color: var(--muted);
}

.server-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.review-article table,
.policy-page table {
  width: 100%;
  border-collapse: collapse;
}

.review-article td,
.review-article th,
.policy-page td,
.policy-page th {
  padding: 8px;
  border: 1px solid var(--line);
}

.review-article th {
  text-align: left;
}

.review-article th:nth-child(3),
.review-article td:nth-child(3) {
  text-align: right;
}

.review-article td:nth-child(2) {
  color: #ffb82e;
  font-weight: 700;
  white-space: nowrap;
}

.review-article img,
.policy-page img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.review-article table,
.policy-page table {
  display: block;
  overflow-x: auto;
}

.review-stars button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Fit game cards to the available content width, including a compact sidebar. */
.content {
  min-width: 0;
  max-width: none;
  container-type: inline-size;
}

.discovery-grid,
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 18px;
}

.feature-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr));
  gap: 14px;
}

.discovery-card,
.game-tile {
  min-width: 0;
}

.discovery-image {
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
}

.discovery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-section + .catalog-section {
  margin-top: 32px;
}

.load-bar button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 600px) {
  .discovery-grid,
  .trending-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .discovery-stats,
  .tile-meta {
    flex-wrap: wrap;
  }

  .discovery-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
  }

  .discovery-actions {
    gap: 4px;
  }

  .discover-open {
    max-width: 100%;
  }
}

@media (max-width: 340px) {
  .discovery-grid,
  .trending-grid,
  .feature-layout,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact game tiles: thumbnail, name and weekly change. */
.discovery-grid,
.trending-grid,
.feature-layout {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
  gap: 16px;
}

.compact-game {
  display: block;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.compact-game__image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--soft);
  box-shadow: 0 2px 6px #00000014;
}

.compact-game__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.compact-game__caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  padding: 9px 2px 3px;
}

.compact-game__caption strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-game__change {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--green, #21834b);
  background: var(--soft);
  border-radius: 6px;
  padding: 2px 5px;
  white-space: nowrap;
}

.compact-game__change.is-down {
  color: #d45151;
}

.compact-game:focus-visible {
  outline: 3px solid var(--accent, #5c91ff);
  outline-offset: 4px;
  border-radius: 16px;
}

@media (hover: hover) {
  .compact-game:hover {
    transform: translateY(-3px);
  }

  .compact-game:hover img {
    transform: scale(1.04);
  }
}

@media (max-width: 600px) {
  .discovery-grid,
  .trending-grid,
  .feature-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .compact-game__image {
    border-radius: 12px;
  }

  .compact-game__caption {
    flex-wrap: wrap;
    gap: 4px;
  }

  .compact-game__caption strong {
    font-size: 12px;
  }
}

@media (max-width: 320px) {
  .discovery-grid,
  .trending-grid,
  .feature-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.review-article h1,
.review-article h2,
.review-article h3,
.game-heading h1 {
  color: var(--accent, #4e8cff);
}

.review-article h2 {
  margin-top: 28px;
}

.review-article h3 {
  margin-top: 20px;
}

.review-article li {
  margin-bottom: 10px;
}

/* Game lists use the same image zoom and sliding title as slope3.com/theme5. */
.compact-game {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s cubic-bezier(0.2, 0.65, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.compact-game__image {
  position: absolute;
  inset: 0;
  display: block;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.compact-game__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.compact-game__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  padding: 20px 10px 8px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.65, 0.3, 1),
    opacity 0.28s cubic-bezier(0.2, 0.65, 0.3, 1);
  pointer-events: none;
}

.compact-game__caption strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
}

.compact-game:hover,
.compact-game:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 2px #548cff66,
    0 14px 30px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.compact-game:hover .compact-game__image img,
.compact-game:focus-visible .compact-game__image img {
  transform: scale(1.12);
}

.compact-game:hover .compact-game__caption,
.compact-game:focus-visible .compact-game__caption,
.compact-game:active .compact-game__caption {
  transform: translateY(0);
  opacity: 1;
}

.compact-game__change {
  display: none;
}

/* Smaller headings leave more space for the game collection. */
.content {
  padding: 18px 22px 32px;
}

.discovery-intro {
  align-items: center;
  padding: 0;
  margin-bottom: 8px;
  gap: 12px;
}

.discovery-intro .eyebrow {
  display: none;
}

.discovery-intro h1,
.trending-intro h1 {
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.discovery-intro p,
.trending-intro p {
  font-size: 13px;
  margin: 0;
}

.discovery-section-heading {
  margin-bottom: 12px;
}

.discovery-section-heading h2,
.discovery-section-heading .discovery-section-title,
.catalog-section > h2 {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

.catalog-section + .catalog-section {
  margin-top: 24px;
}

.trending-intro {
  padding: 0 0 18px;
}

.heading-copy h1 {
  font-size: 23px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.article-block .section-heading h2 {
  font-size: 18px;
}

/* Color belongs to the icon, independent of the active menu background. */
.nav-item .nav-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--nav-color, #a78bfa);
  background: color-mix(in srgb, var(--nav-color, #a78bfa) 13%, transparent);
  font-size: 19px;
}

.nav-item .nav-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.nav-item .nav-icon.nav-icon--image {
  display: inline-flex;
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  overflow: hidden;
}

.nav-item .nav-icon.nav-icon--image img {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  max-height: 28px;
  border-radius: inherit;
  object-fit: cover;
}

.nav-item[data-page="home"] {
  --nav-color: #60a5fa;
}

.nav-item[data-page="games"] {
  --nav-color: #a78bfa;
}

.nav-item[data-page="reviews"] {
  --nav-color: #fbbf24;
}

.nav-item[data-page="trending"] {
  --nav-color: #fb923c;
}

.nav-item[data-page="favorites"] {
  --nav-color: #fb7185;
}

.nav-item[data-page="new"] {
  --nav-color: #34d399;
}

/* The main recommendation rows and the two-column sidebar share one eight-column grid. */
.detail-layout {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.detail-main {
  grid-column: span 6;
  min-width: 0;
}

.detail-aside {
  grid-column: span 2;
  display: block;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  position: static;
}

.detail-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-recommendations {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
}

.detail-recommendations .related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.detail-layout.no-recommendations .detail-main {
  grid-column: 1/-1;
}

.game-heading {
  padding: 10px 0 12px;
}

.game-heading > img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.game-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.game-categories a {
  display: inline-block;
  text-decoration: none;
  background: var(--soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 11px;
  padding: 4px 10px;
}

.game-categories a:hover {
  color: var(--accent, #548cff);
}

.game-trend-summary {
  display: flex;
  flex: 1 1 390px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  min-width: 0;
  padding: 8px 14px;
  margin: 0;
}

.game-trend-summary > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.game-trend-summary small {
  font-size: 11px;
  color: var(--muted);
}

.game-trend-summary strong {
  font-size: 14px;
}

.game-trend-summary .growth {
  color: #34b97d;
}

.review-rating-bar {
  display: flex;
  flex: 1 1 450px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 0;
  /* padding: 8px 14px; */
  border: 0;
  /* border-left: 1px solid var(--line); */
  border-radius: 0;
  background: transparent;
}

.review-rating-bar.no-trend {
  flex-basis: 100%;
  border-left: 0;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rating__stars {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #718096;
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: filter 0.15s ease;
}

.rating__star {
  display: inline-block;
  color: #718096;
}

.rating__star.is-full {
  color: #fbbf24;
}

.rating__star.is-half {
  color: transparent;
  background: linear-gradient(90deg, #fbbf24 50%, #718096 50%);
  background-clip: text;
  -webkit-background-clip: text;
}

.rating__stars:hover {
  filter: brightness(1.12);
}

.rating__stars:focus-visible {
  border-radius: 3px;
  outline: 2px solid #fbbf24;
  outline-offset: 3px;
}

.rating__stars[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.65;
}

.rating__meta {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
}

.rating__meta strong {
  color: #fbbf24;
  font-size: 14px;
}

.rating__meta span {
  color: var(--muted);
}

.game-heading__data {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.review-stars button:disabled {
  cursor: default;
  opacity: 0.4;
}

.source-title > small,
.source-observed {
  display: block;
  line-height: 1.6;
}

.source-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
  font-size: 12px;
}

.source-metrics > span {
  background: var(--soft);
  padding: 3px 7px;
  border-radius: 5px;
}

.source-observed {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.source-metrics .growth {
  color: #34b97d;
}

@media (max-width: 1200px) {
  .detail-layout {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .detail-main {
    grid-column: span 4;
  }

  .detail-aside {
    grid-column: span 2;
  }

  .detail-recommendations .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .detail-layout {
    display: block;
  }

  .detail-aside {
    margin-top: 16px;
  }

  .detail-game-grid,
  .detail-recommendations .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .content {
    padding: 12px;
  }

  .discovery-intro h1,
  .trending-intro h1 {
    font-size: 21px;
  }

  .discovery-intro {
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .discovery-intro p {
    font-size: 12px;
  }

  .discovery-section-heading h2,
  .discovery-section-heading .discovery-section-title {
    font-size: 17px;
  }

  .heading-copy h1 {
    font-size: 20px;
  }

  .detail-game-grid,
  .detail-recommendations .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .compact-game__caption strong {
    font-size: 12px;
  }

  .game-trend-summary {
    gap: 8px 16px;
    padding: 9px;
  }

  .game-trend-summary > span {
    flex-wrap: wrap;
    gap: 3px 6px;
  }

  .review-rating-bar {
    flex-wrap: wrap;
  }

  .game-heading__data {
    align-items: stretch;
  }

  .game-trend-summary,
  .review-rating-bar {
    flex: 1 1 100%;
    padding: 9px 11px;
  }

  .review-rating-bar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .rating {
    flex-wrap: wrap;
    gap: 5px 8px;
  }

  .rating__stars {
    font-size: 20px;
  }

  .source-row {
    align-items: flex-start;
  }

  .source-metrics {
    gap: 5px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .compact-game,
  .compact-game__image img,
  .compact-game__caption {
    transition: none;
  }
}

.trending-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.content > h1,
.policy-page h1 {
  font-size: 25px;
}

.review-article h2 {
  font-size: 20px;
}

.review-article h3 {
  font-size: 16px;
}

/* Keep navigation alongside both the page and its footer. */
:root {
  --header-height: 64px;
}

.shell {
  align-items: flex-start;
}

.main-column {
  flex: 1;
  min-width: 0;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
}

.main-column > .content {
  width: 100%;
  flex: 1;
}

.site-footer {
  text-align: center;
}

.site-footer nav {
  justify-content: center;
}

.sidebar {
  height: 100vh;
  height: 100dvh;
  top: 0;
  margin-top: calc(-1 * var(--header-height));
  padding-top: calc(var(--header-height) + 14px);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.category-pills button,
.game-categories a {
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.category-pills button:hover,
.game-categories a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #2189ff30;
}

.category-pills button.on:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.periods {
  margin-top: 14px;
}

.detail-main > .player {
  margin-bottom: 14px;
}

.page-content {
  margin: 24px 0 0;
  overflow-wrap: anywhere;
  line-height: 1.8;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

.page-content table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}

.page-content td,
.page-content th {
  border: 1px solid var(--line);
  padding: 8px;
}

.page-content a {
  color: var(--blue);
}

.page-content h2 {
  font-size: 20px;
}

.page-content h3 {
  font-size: 17px;
}

.trend-rank > span {
  flex: 1;
  min-width: 0;
}

.trend-rank > b {
  flex: none;
  width: 22px;
}

.trend-rank > em {
  flex: none;
}

@media (max-width: 700px) {
  :root {
    --header-height: 58px;
  }

  .sidebar,
  body[data-menu="compact"] .sidebar {
    top: var(--header-height);
    margin-top: 0;
    padding-top: 14px;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
  }
}

@media (max-width: 540px) {
  :root {
    --header-height: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-pills button,
  .game-categories a {
    transition: none;
  }
}

/* Server-rendered category links retain the existing button appearance. */
[hidden] {
  display: none !important;
}

.category-pills a {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 25px;
  padding: 9px 15px;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.category-pills a.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.category-pills a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #2189ff30;
}

.category-pills a.on:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.discovery-filters a {
  padding: 10px 17px;
}

.recently-viewed {
  margin-bottom: 24px;
}

.recent-games-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-game {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}

.recent-game img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-game:hover,
.recent-game:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .recently-viewed {
    display: none;
  }
}

#gameList:empty,
#listingStatus:empty {
  display: none;
}

.load-bar a[aria-disabled="true"] {
  opacity: 0.6;
  cursor: wait;
}

.load-bar > a + a {
  margin-left: 12px;
}

@media (max-width: 540px) {
  .discovery-filters a {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-pills a {
    transition: none;
  }
}

/* Three thumbnail sizes use the original game.outstanding setting and share 110px cells. */
.discovery-grid,
.trending-grid,
.feature-layout,
.related-grid,
.detail-game-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(110px, calc((100% - 20px) / 3)), 1fr)
  );
  grid-auto-flow: row dense;
  grid-auto-rows: auto;
  align-items: start;
  gap: 10px;
}

.compact-game {
  --tile-span: 1;
  grid-column: span var(--tile-span);
  grid-row: span var(--tile-span);
  align-self: start;
  aspect-ratio: 1;
  border-radius: 12px;
}

.compact-game--s2 {
  --tile-span: 2;
}

.compact-game--s3 {
  --tile-span: 3;
}

.compact-game__caption {
  padding: 18px 8px 7px;
}

.compact-game__caption strong {
  font-size: 11px;
}

.compact-game--s2 .compact-game__caption strong,
.compact-game--s3 .compact-game__caption strong {
  font-size: 14px;
}

/* Review and cards occupy one grid; desktop side columns exist before JS measures rows. */
.review-detail-grid {
  --review-start: 1;
  --review-span: 3;
  --review-rows: 1;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(110px, calc((100% - 20px) / 3)), 1fr)
  );
  grid-auto-flow: row dense;
  grid-auto-rows: auto;
  gap: 10px;
  align-items: start;
}

.review-detail-grid > .review-content {
  grid-column: 1/-1;
  grid-row: 1;
  min-width: 0;
  align-self: start;
  display: flow-root;
}

.review-content > .player {
  margin-bottom: 14px;
}

.review-content > .article-block:last-child {
  margin-bottom: 0;
}

.review-detail-grid.is-measured {
  grid-auto-rows: var(--review-cell);
}

.review-detail-grid.is-measured > .review-content {
  grid-row: 1 / span var(--review-rows);
}

@media (min-width: 1100px) {
  .review-detail-grid {
    --review-start: 1;
    --review-span: 6;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .review-detail-grid > .review-content {
    grid-column: var(--review-start) / span var(--review-span);
  }

  .review-detail-grid > .compact-game--s2,
  .review-detail-grid > .compact-game--s3 {
    --tile-span: 1;
  }
}

@container (min-width:800px) {
  .review-detail-grid {
    --review-start: 1;
    --review-span: 6;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .review-detail-grid > .review-content {
    grid-column: var(--review-start) / span var(--review-span);
  }

  .review-detail-grid > .compact-game--s2,
  .review-detail-grid > .compact-game--s3 {
    --tile-span: 1;
  }
}

@container (min-width:1050px) {
  .review-detail-grid {
    --review-span: 7;
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .review-detail-grid > .compact-game--s2,
  .review-detail-grid > .compact-game--s3 {
    --tile-span: 2;
  }
}

@container (min-width:1320px) {
  .review-detail-grid {
    --review-span: 8;
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .review-detail-grid > .compact-game--s3 {
    --tile-span: 3;
  }
}

@container (min-width:1560px) {
  .review-detail-grid {
    --review-span: 10;
    grid-template-columns: repeat(14, minmax(0, 1fr));
  }
}

@container (min-width:1800px) {
  .review-detail-grid {
    --review-span: 11;
    grid-template-columns: repeat(16, minmax(0, 1fr));
  }
}

.review-detail-grid.no-recommendations > .review-content {
  grid-column: 1/-1;
}

.review-rating-summary__stars {
  position: relative;
  display: block;
  width: max-content;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 2px;
  color: #697386;
}

.review-rating-summary__stars:before {
  content: "★★★★★";
  position: absolute;
  inset: 0;
  width: var(--rate, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: #f5b82e;
}
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  color: var(--accent, #4e8cff);
}
