:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f6eaf4;
  --ink: #20131a;
  --muted: #634b58;
  --border: #422e39;
  --primary: #f207cf;
  --on-primary: #050608;
  --secondary: #72f33f;
  --on-secondary: #050608;
  --accent: #4db9ef;
  --on-accent: #050608;
}

/* Shared foundations for every generated layout. Layout files own composition. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

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

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand,
.game-card__title,
.ranking-row__title,
.rank-row__title {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.page-shell {
  width: min(100%, 1440px);
  min-width: 0;
  margin-inline: auto;
  padding: 28px clamp(16px, 3vw, 40px) 64px;
}

.page-shell > *,
.detail-layout > *,
.header-inner > * {
  min-width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  display: flex;
  width: min(100%, 1440px);
  min-height: 72px;
  margin-inline: auto;
  padding: 12px clamp(16px, 3vw, 40px);
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 850;
  line-height: 1.1;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1rem;
  font-weight: 900;
}

.search-shell {
  position: relative;
  display: flex;
  width: min(100%, 520px);
  min-width: 180px;
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.search-shell input,
.search-shell [type="search"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 46px 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.9375rem;
}

.search-shell input::placeholder,
.search-shell [type="search"]::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-shell input:focus,
.search-shell [type="search"]:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--soft);
}

.search-shell > button,
.search-shell > [role="button"] {
  position: absolute;
  right: 5px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: var(--on-primary);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 70;
  max-height: min(440px, calc(100vh - 112px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.16);
}

.search-result {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 68px;
  padding: 8px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--soft);
}

.search-result__image {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.search-result__body {
  min-width: 0;
}

.search-result__title,
.search-result__meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result__title {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 750;
}

.search-result__meta,
.search-empty {
  color: var(--muted);
  font-size: 0.75rem;
}

.search-empty {
  padding: 18px;
  text-align: center;
}

.menu-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 2px auto;
  border-radius: 999px;
  background: currentColor;
}

.header-categories {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.drawer-head {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 750;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 79;
  visibility: hidden;
  background: var(--ink);
  opacity: 0;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  width: min(330px, calc(100vw - 48px));
  max-width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 180ms ease, visibility 180ms ease;
}

.mobile-drawer.is-open,
.mobile-drawer[data-open="true"],
body.drawer-open .mobile-drawer {
  visibility: visible;
  transform: translateX(0);
}

.drawer-overlay.is-open,
.drawer-overlay[data-open="true"],
body.drawer-open .drawer-overlay {
  visibility: visible;
  opacity: 0.56;
}

.nav-link,
.drawer-link {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 11px;
  align-items: center;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.nav-link:hover,
.drawer-link:hover,
.nav-link[aria-current="page"],
.drawer-link[aria-current="page"] {
  background: var(--soft);
  color: var(--primary);
}

.category-pills {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 2px 0 6px;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pills a,
.category-pills button,
.category-link {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.category-pills a:hover,
.category-pills button:hover,
.category-pills .is-active,
.category-pills [aria-current="page"],
.category-link:hover,
.category-link--active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.category-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.category-list .category-link {
  width: 100%;
  justify-content: space-between;
  border-radius: 6px;
  white-space: normal;
}

.category-link__count {
  display: inline-grid;
  min-width: 26px;
  min-height: 22px;
  padding: 2px 6px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.category-link--active .category-link__count {
  background: var(--on-primary);
  color: var(--primary);
}

.game-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.game-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.game-card__media {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
}

.game-card__image,
.game-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.game-card:hover .game-card__image,
.game-card:hover .game-card__media > img {
  transform: scale(1.025);
}

.game-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.game-card__badge,
.game-card__hot {
  position: absolute;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  min-height: 25px;
  padding: 4px 7px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 850;
  line-height: 1;
}

.game-card__badge {
  right: 8px;
  background: var(--secondary);
  color: var(--on-secondary);
}

.game-card__hot {
  left: 8px;
  background: var(--accent);
  color: var(--on-accent);
}

.game-card__body {
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px 12px;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.game-card__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.game-card__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.game-card__category {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__rating {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.game-card--wide .game-card__media,
.game-card--hero-main .game-card__media,
.game-card--hero-secondary .game-card__media {
  aspect-ratio: 16 / 9;
}

.game-card--compact {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
}

.game-card--compact .game-card__media {
  height: 100%;
  min-height: 88px;
  aspect-ratio: auto;
}

.game-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.game-list {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.rail {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.rail > [data-game-list],
.rail[data-game-list],
.rail > .game-list,
.related-list {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 2px 2px 10px;
  grid-auto-columns: minmax(174px, 22%);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.rail > [data-game-list] > *,
.rail[data-game-list] > *,
.rail > .game-list > *,
.related-list > * {
  scroll-snap-align: start;
}

.hero-main,
.hero-secondary,
.side-panel {
  min-width: 0;
}

.hero-main .game-card {
  width: 100%;
}

.hero-secondary > [data-game-list],
.hero-secondary.game-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.side-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

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

.section-heading h1,
.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}

.section-heading h2 {
  font-size: 1.375rem;
}

.section-heading > a {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 750;
}

.section-label,
.side-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  margin-bottom: 18px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 750;
}

.breadcrumbs span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-list,
.ranking-list__items {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list__items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-row,
.rank-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.ranking-row__position,
.rank-row__position {
  display: grid;
  min-height: 76px;
  place-items: center;
  border-right: 1px solid var(--border);
  background: var(--soft);
  color: var(--primary);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ranking-row__link,
.rank-row__link {
  display: grid;
  min-width: 0;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
}

.ranking-row__image,
.rank-row__image {
  width: 88px;
  height: 100%;
  min-height: 76px;
  object-fit: cover;
}

.ranking-row__body,
.rank-row__body {
  min-width: 0;
  padding: 10px 12px;
}

.ranking-row__title,
.rank-row__title,
.ranking-row__meta,
.rank-row__meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row__title,
.rank-row__title {
  font-size: 0.875rem;
  font-weight: 800;
}

.ranking-row__meta,
.rank-row__meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.player-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--ink);
}

.player-shell iframe,
.player-shell video,
.player-shell > img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.game-player__preview,
.game-player__frame-host,
.game-player__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-player__preview {
  overflow: hidden;
  background: var(--primary);
  color: var(--on-primary);
}

.game-player__image,
.game-player__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-player__image {
  object-fit: cover;
  opacity: 0.64;
}

.game-player__placeholder {
  background: var(--primary);
}

.game-player__preview-content {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 2;
  width: min(430px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid var(--on-primary);
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
}

.game-player__eyebrow {
  margin: 0 0 5px;
  color: var(--on-primary);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-player__title {
  margin: 0 0 14px;
  color: var(--on-primary);
  font-size: 1.5rem;
  line-height: 1.12;
}

.game-player__play,
.game-player__fullscreen {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.game-player__error {
  margin: 10px 0 0;
  color: var(--on-primary);
  font-size: 0.8125rem;
}

.game-player__frame-host {
  z-index: 3;
  background: var(--ink);
}

.game-player__iframe {
  border: 0;
  background: var(--ink);
}

.game-player__fullscreen {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  background: var(--secondary);
  color: var(--on-secondary);
}

.game-info {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.game-info__heading {
  display: flex;
  min-width: 0;
  margin-bottom: 16px;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.game-info__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.375rem;
  line-height: 1.15;
}

.game-info__meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.game-info__rating {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  padding: 6px 9px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--secondary);
  color: var(--on-secondary);
  font-size: 0.8125rem;
  font-weight: 850;
}

.game-info__description {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.game-stats {
  display: grid;
  width: 100%;
  min-width: 0;
  margin: 24px 0;
  padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.game-stats__item {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.game-stats__item dt {
  color: var(--muted);
  font-size: 0.6875rem;
}

.game-stats__item dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-shell button,
.player-shell [role="button"] {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.85fr);
  align-items: start;
  gap: 24px;
}

.related-list {
  grid-auto-columns: minmax(164px, 20%);
}

.load-more {
  display: flex;
  width: max-content;
  min-width: 132px;
  min-height: 44px;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.875rem;
  font-weight: 800;
}

.load-more:hover {
  background: var(--secondary);
  color: var(--on-secondary);
}

.google-slot-empty:empty {
  display: none;
}

.google-slot-empty:not(:empty) {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 90px;
  margin-block: 24px;
  place-items: center;
  overflow: hidden;
}

.empty-state {
  width: 100%;
  padding: 48px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.site-footer > * {
  width: min(100%, 1440px);
  min-width: 0;
  margin-inline: auto;
  padding: 28px clamp(16px, 3vw, 40px);
}

@media (min-width: 600px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 900px) {
  .menu-button {
    display: none;
  }

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

@media (min-width: 1240px) {
  .game-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .header-inner {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    max-width: calc(100% - 54px);
    font-size: 1.25rem;
  }

  .search-shell {
    width: min(100%, 420px);
    min-width: 0;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .related-list,
  .rail > [data-game-list],
  .rail[data-game-list],
  .rail > .game-list {
    grid-auto-columns: minmax(160px, 42%);
  }
}

@media (max-width: 639px) {
  .page-shell {
    padding: 20px 14px 48px;
  }

  .header-inner {
    padding-inline: 14px;
  }

  .header-inner > .search-shell {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .search-results {
    position: fixed;
    top: 116px;
    right: 14px;
    left: 14px;
    max-height: calc(100vh - 132px);
  }

  .game-card__body {
    min-height: 62px;
    padding: 9px 10px 10px;
  }

  .game-card__title {
    font-size: 0.8125rem;
  }

  .game-card__meta {
    font-size: 0.6875rem;
  }

  .hero-secondary > [data-game-list],
  .hero-secondary.game-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail > [data-game-list],
  .rail[data-game-list],
  .rail > .game-list,
  .related-list {
    grid-auto-columns: minmax(150px, 72%);
  }

  .side-panel {
    padding: 14px;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading h2 {
    font-size: 1.1875rem;
  }

  .game-player__preview-content {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    padding: 14px;
  }

  .game-player__title {
    margin-bottom: 10px;
    font-size: 1.125rem;
  }

  .game-info {
    padding: 16px;
  }

  .game-info__heading {
    flex-direction: column;
  }

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

  .ranking-row__link,
  .rank-row__link {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .ranking-row__image,
  .rank-row__image {
    width: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Editorial Mosaic: masthead, lead story composition, lists and portrait posters. */

body {
  background: var(--surface);
}

h1,
h2,
h3,
.brand,
.hero-main .game-card__title {
  font-family: Georgia, "Times New Roman", serif;
}

.site-header {
  position: relative;
  border-top: 5px solid var(--primary);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  position: relative;
  display: grid;
  min-height: 116px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
}

.brand {
  grid-column: 2;
  justify-self: center;
  font-size: 2rem;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 0;
}

.search-shell {
  grid-column: 3;
  width: min(100%, 320px);
  justify-self: end;
}

.menu-button {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  border-radius: 0;
}

.nav-link,
.drawer-link {
  border-radius: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.category-pills {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: 9px 0;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.category-pills a,
.category-pills button,
.category-link {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.875rem;
}

.category-pills a:hover,
.category-pills button:hover,
.category-pills .is-active,
.category-pills [aria-current="page"],
.category-link:hover,
.category-link--active {
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.page-shell {
  display: grid;
  width: min(100%, 1180px);
  padding-top: 34px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
  gap: 28px;
}

.page-shell > :not(.hero-main):not(.hero-secondary) {
  grid-column: 1 / -1;
}

.hero-main {
  grid-column: 1;
  grid-row: 1;
}

.hero-secondary {
  grid-column: 2;
  grid-row: 1;
}

.game-card {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.game-card:hover {
  border-color: var(--border);
  transform: none;
}

.game-card__media {
  border-bottom: 1px solid var(--border);
}

.hero-main .game-card {
  border-top: 4px solid var(--primary);
  border-bottom-width: 2px;
}

.hero-main .game-card__media {
  aspect-ratio: 4 / 3;
}

.hero-main .game-card__body {
  min-height: 104px;
  padding: 17px 2px 18px;
  justify-content: flex-start;
}

.hero-main .game-card__title {
  font-size: 1.75rem;
  line-height: 1.08;
}

.hero-secondary > [data-game-list],
.hero-secondary.game-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.hero-secondary .game-card {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-secondary .game-card__media {
  aspect-ratio: 16 / 9;
}

.hero-secondary .game-card__body {
  min-height: 64px;
  padding: 10px 0 11px;
}

.hero-secondary .game-card__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.rail {
  padding: 28px 0;
  border-top: 3px solid var(--ink);
  overflow: visible;
}

.rail > [data-game-list],
.rail[data-game-list],
.rail > .game-list {
  display: grid;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-columns: auto;
  grid-auto-flow: row;
  gap: 24px;
  overflow: visible;
}

.rail .game-card__media {
  aspect-ratio: 3 / 2;
}

.rail .game-card__body {
  padding-inline: 0;
}

.game-list {
  gap: 0;
  border-top: 3px solid var(--ink);
}

.game-list .game-card,
.game-card--compact {
  display: grid;
  grid-template-columns: minmax(128px, 190px) minmax(0, 1fr);
  min-height: 132px;
  padding-block: 14px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.game-list .game-card__media,
.game-card--compact .game-card__media {
  height: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
}

.game-list .game-card__body,
.game-card--compact .game-card__body {
  padding: 8px 0 8px 18px;
  justify-content: flex-start;
}

.game-list .game-card__title,
.game-card--compact .game-card__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
}

.game-grid {
  padding-top: 28px;
  border-top: 3px solid var(--ink);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}

.game-grid .game-card__media {
  aspect-ratio: 3 / 4;
}

.game-grid .game-card__body {
  padding-inline: 0;
  justify-content: flex-start;
}

.game-grid .game-card__title {
  font-family: Georgia, "Times New Roman", serif;
}

.side-panel {
  padding: 20px 0 20px 20px;
  border-width: 0 0 0 1px;
  border-radius: 0;
}

.ranking-row,
.rank-row {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.ranking-row__position,
.rank-row__position {
  background: var(--surface);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
}

.detail-layout {
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  padding-top: 6px;
  border-top: 4px solid var(--primary);
}

.player-shell {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.related-list {
  padding-top: 22px;
  border-top: 3px solid var(--ink);
  grid-auto-columns: minmax(180px, 22%);
}

.related-list .game-card__media {
  aspect-ratio: 3 / 4;
}

.load-more {
  border-radius: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.empty-state,
.search-results,
.search-shell input,
.search-shell [type="search"] {
  border-radius: 0;
}

.site-footer {
  border-top: 4px solid var(--ink);
  background: var(--surface);
}

@media (max-width: 899px) {
  .header-inner {
    min-height: 88px;
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    gap: 10px;
  }

  .brand {
    grid-column: 2;
    font-size: 1.625rem;
  }

  .header-inner > .search-shell {
    display: flex;
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .header-inner > .header-categories {
    display: none;
  }

  .page-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-main,
  .hero-secondary,
  .page-shell > :not(.hero-main):not(.hero-secondary) {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-secondary > [data-game-list],
  .hero-secondary.game-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-panel {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 639px) {
  .header-inner {
    display: grid;
    min-height: 74px;
    flex-wrap: nowrap;
  }

  .brand {
    max-width: 100%;
    justify-content: center;
    font-size: 1.375rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .category-pills {
    width: calc(100% - 28px);
    justify-content: flex-start;
  }

  .page-shell {
    padding-top: 22px;
    gap: 22px;
  }

  .hero-main .game-card__media {
    aspect-ratio: 4 / 3;
  }

  .hero-main .game-card__body {
    min-height: 88px;
  }

  .hero-main .game-card__title {
    font-size: 1.375rem;
  }

  .hero-secondary {
    overflow: hidden;
  }

  .hero-secondary > [data-game-list],
  .hero-secondary.game-list {
    display: grid;
    padding-bottom: 8px;
    grid-auto-columns: 78%;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .hero-secondary .game-card {
    scroll-snap-align: start;
  }

  .rail > [data-game-list],
  .rail[data-game-list],
  .rail > .game-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .rail .game-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    padding-block: 12px;
  }

  .rail .game-card__media {
    height: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
  }

  .rail .game-card__body {
    padding: 6px 0 6px 12px;
  }

  .game-list .game-card,
  .game-card--compact {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 104px;
  }

  .game-list .game-card__body,
  .game-card--compact .game-card__body {
    padding-left: 12px;
  }

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

  .related-list {
    grid-auto-columns: 72%;
  }
}

/* Home template composition. */
.masthead,
.editorial-nav,
.editorial-main {
  width: min(calc(100% - 32px), 1180px);
  margin-inline: auto;
}

.masthead {
  position: relative;
  display: grid;
  min-height: 106px;
  grid-template-columns: 50px minmax(0, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
}

.masthead .brand {
  grid-column: 2;
  justify-self: center;
}

.masthead > p {
  margin: 0;
  justify-self: end;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.8125rem;
}

.editorial-nav {
  display: flex;
  min-height: 56px;
  padding-block: 8px;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--border);
}

.editorial-nav .header-categories {
  flex: 1 1 auto;
}

.editorial-main {
  padding: 0 0 64px;
}

.lead-mosaic {
  display: grid;
  margin-top: 30px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
  gap: 28px;
}

.editorial-columns {
  display: grid;
  margin-top: 42px;
  padding-top: 26px;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 36px;
  border-top: 4px solid var(--ink);
}

.poster-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  border-top: 0;
}

.poster-list .game-card {
  display: flex;
  min-height: 0;
  padding: 0;
}

.poster-list .game-card__media {
  height: auto;
  aspect-ratio: 3 / 4;
}

.poster-list .game-card__body {
  padding: 9px 0;
}

.archive-section {
  margin-top: 46px;
}

@media (max-width: 799px) {
  .masthead {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
  }

  .masthead > p,
  .editorial-nav .header-categories {
    display: none;
  }

  .editorial-nav {
    display: flex;
    min-height: 0;
    padding-block: 10px;
  }

  .editorial-nav .search-shell {
    display: flex;
    width: 100%;
  }

  .lead-mosaic,
  .editorial-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 639px) {
  .masthead,
  .editorial-nav,
  .editorial-main {
    width: calc(100% - 28px);
  }

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