@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-regular-site.woff2?v=20260906") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-medium-site.woff2?v=20260906") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-semibold-site.woff2?v=20260906") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "QianTu HouHei"; src: url("/fonts/qiantu-houhei-site.woff2?v=20260906") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #101820;
  --ink-soft: #2f3a44;
  --muted: #65717b;
  --line: rgba(16, 24, 32, 0.14);
  --paper: #f3f5f6;
  --white: #fff;
  --gold: #e2b74f;
  --blue: #315f9f;
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--white); background: var(--ink); }

.games-header,
.games-main { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }

.games-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.games-brand { width: 118px; height: 48px; display: grid; place-items: center; }
.games-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.games-back {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.games-hero {
  min-height: 430px;
  padding: clamp(46px, 6vw, 76px) 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: clamp(46px, 7vw, 104px);
  align-items: center;
}

.games-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.games-hero h1 {
  margin: 20px 0 0;
  font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif;
  font-size: clamp(68px, 7.2vw, 104px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.games-hero-copy > p:last-child {
  max-width: 25em;
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.76;
}

.games-hero-art { margin: 0; align-self: end; }
.games-hero-art img { display: block; width: 100%; height: auto; border-radius: 24px; box-shadow: 0 25px 64px rgba(16, 24, 32, 0.1); }
.games-hero-art figcaption { margin-top: 10px; color: var(--muted); font-size: 11px; text-align: right; }

.games-directory-hero { min-height: 410px; }
.games-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: clamp(90px, 10vw, 140px);
}
.games-category {
  position: relative;
  min-height: 0;
  padding: clamp(32px, 3.2vw, 46px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(34px, 3vw, 46px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: var(--white);
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, border-color 220ms ease;
}
.games-category-copy { position: relative; z-index: 2; width: 100%; }
.games-category h2 {
  margin: 28px 0 0;
  font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif;
  font-size: clamp(52px, 4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  white-space: nowrap;
}
.games-category-copy > p:not(.games-status) {
  max-width: 29em;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.76;
}
.games-category-action {
  text-decoration: none;
  min-height: 50px;
  margin-top: 28px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 12px;
  color: var(--white);
  background: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.games-empty-mark {
  align-self: end;
  justify-self: end;
  width: min(68%, 280px);
  color: rgba(16, 24, 32, 0.08);
  font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif;
  font-size: clamp(112px, 13vw, 180px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.72;
  text-align: right;
}
.games-category-covers {
  width: min(100%, 720px);
  margin: auto auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.games-category-game { display: block; min-width: 0; color: inherit; text-decoration: none; }
.games-category-covers figure {
  min-width: 0;
  margin: 0;
}
.games-category-cover {
  position: relative;
  display: block;
  height: 0;
  padding-top: 156.33%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 22px 50px rgba(31, 56, 75, 0.16);
}
.games-category-covers img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.games-category-covers figure:first-child img { object-position: 50% 58%; }
.games-category-covers figure:last-child img { object-position: 50% 66%; }
.games-category-covers figcaption {
  margin-top: 16px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.games-category-covers figcaption strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.games-section-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.games-section-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.games-section-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 8px; }
.games-subcategory-intro { padding: clamp(54px, 7vw, 96px) 0 clamp(42px, 5vw, 70px); }
.games-subcategory-intro h1,
.games-empty-state h1 {
  margin: 20px 0 0;
  font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif;
  font-size: clamp(68px, 7.2vw, 104px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.94;
}
.games-subcategory-intro > p:last-child { max-width: 38em; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.76; }
.games-empty-state {
  min-height: min(720px, calc(100vh - 148px));
  padding: clamp(70px, 10vw, 140px) clamp(28px, 6vw, 84px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: var(--white);
}
.games-empty-status { margin: 48px 0 0; color: var(--ink); font-size: clamp(24px, 2.5vw, 34px); font-weight: 500; }
.games-empty-state > p:not(.games-eyebrow):not(.games-empty-status) { max-width: 38em; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

.games-catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.games-release {
  position: relative;
  min-height: 560px;
  padding: clamp(34px, 4.3vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(230px, 0.82fr);
  grid-template-rows: 1fr;
  gap: clamp(34px, 5vw, 74px);
  align-items: center;
  overflow: hidden;
  border-radius: 24px;
}

.games-runner,
.games-stack,
.games-teahouse,
.games-sunbird-guard {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.games-release-copy { position: relative; z-index: 2; }
.games-status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.games-runner .games-status { color: #607169; }

.games-release h2 {
  max-width: none;
  margin: 30px 0 0;
  font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif;
  font-size: clamp(42px, 4.2vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  white-space: nowrap;
}
.games-keep-together { white-space: nowrap; }
.games-stack h2 { max-width: none; font-size: clamp(42px, 4.2vw, 60px); white-space: nowrap; }

.games-release-copy > p:not(.games-status) {
  max-width: 31em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.76;
}
.games-runner .games-release-copy > p:not(.games-status) { color: var(--muted); }

.games-release ul {
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid var(--line);
}
.games-runner ul { border-color: var(--line); }
.games-release li { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; }
.games-runner li { border-color: var(--line); color: var(--ink-soft); }

.games-play {
  min-height: 50px;
  margin-top: 28px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  color: var(--white);
  background: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease;
}
.games-runner .games-play { border-color: var(--ink); color: var(--white); background: var(--ink); }

.games-release-figure { position: relative; z-index: 1; width: min(100%, 260px); margin: 0 auto; align-self: center; }
.games-2d-figure { width: min(100%, 260px); }
.games-cover-frame { display: block; position: relative; width: 100%; height: 0; padding-top: 156.33%; overflow: hidden; border-radius: 16px; background: var(--paper); box-shadow: 0 24px 58px rgba(31, 56, 75, 0.16); }
.games-release-figure img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.games-2d-cover-frame { display: block; position: relative; width: 100%; height: 0; padding-top: 156.33%; overflow: hidden; border-radius: 16px; background: var(--paper); box-shadow: 0 24px 58px rgba(31, 56, 75, .14); }
.games-2d-cover-frame > img { object-fit: cover; object-position: center; }
.games-runner-figure img { object-position: 50% 58%; }
.games-stack-figure img { object-position: 50% 66%; }
.games-release-figure figcaption { color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.games-runner-figure figcaption,
.games-stack-figure figcaption { margin: 10px -32px 0; color: var(--muted); }

.games-principles {
  padding: clamp(90px, 10vw, 138px) 0 clamp(100px, 11vw, 150px);
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(44px, 8vw, 116px);
}
.games-principles h2 {
  max-width: 10em;
  margin: 0;
  font-size: clamp(40px, 4.7vw, 66px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.games-principle-list { border-top: 1px solid var(--line); }
.games-principle-list p {
  margin: 0;
  padding: 23px 0;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.58;
}
.games-principle-list strong { font-weight: 600; }
.games-principle-list span { color: var(--muted); }

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

@media (hover: hover) and (pointer: fine) {
  .games-back:hover { border-color: var(--ink); transform: translateY(-1px); }
  .games-play:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 24, 32, 0.2); }
  .games-runner .games-play:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28); }
}

@media (max-width: 1040px) {
  .games-hero { grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr); gap: 44px; }
  .games-category-grid { grid-template-columns: 1fr; }
  .games-category { min-height: 0; }
  .games-release { min-height: 520px; grid-template-columns: minmax(0, 1.12fr) minmax(220px, .88fr); }
}

@media (max-width: 780px) {
  .games-header, .games-main { width: min(680px, calc(100% - 32px)); }
  .games-hero { min-height: 0; padding: 48px 0 60px; grid-template-columns: 1fr; gap: 38px; }
  .games-hero h1 { font-size: clamp(66px, 14vw, 92px); }
  .games-hero-art { width: 100%; }
  .games-release { min-height: 0; grid-template-columns: 1fr; gap: 0; }
  .games-release-figure { width: min(58%, 240px); margin-top: 32px; }
  .games-2d-catalog .games-release { min-height: 0; grid-template-columns: 1fr; }
  .games-2d-figure { width: min(58%, 240px); }
  .games-principles { grid-template-columns: 1fr; gap: 38px; }
}

@media (max-width: 580px) {
  .games-header { width: calc(100% - 28px); height: 64px; }
  .games-main { width: calc(100% - 24px); }
  .games-brand { width: 96px; height: 40px; }
  .games-back { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .games-hero { padding-top: 36px; gap: 28px; }
  .games-hero h1 { font-size: clamp(58px, 19vw, 78px); }
  .games-hero-copy > p:last-child { margin-top: 21px; font-size: 15px; }
  .games-hero-art img { border-radius: 16px; }
  .games-hero-art figcaption { font-size: 10px; }
  .games-directory-hero { padding-bottom: 42px; }
  .games-category-grid { gap: 10px; padding-bottom: 78px; }
  .games-category { min-height: 0; padding: 32px 23px; gap: 32px; border-radius: 16px; }
  .games-category h2 { font-size: clamp(48px, 14vw, 62px); }
  .games-category-action { width: 100%; justify-content: center; }
  .games-category-covers { width: min(100%, 320px); grid-template-columns: 1fr; gap: 28px; }
  .games-category-covers figcaption { margin-top: 13px; }
  .games-empty-mark { font-size: 120px; }
  .games-section-nav { min-height: 60px; gap: 22px; }
  .games-subcategory-intro { padding: 42px 0 34px; }
  .games-subcategory-intro h1, .games-empty-state h1 { font-size: clamp(56px, 18vw, 76px); }
  .games-empty-state { min-height: calc(100vh - 124px); padding: 58px 24px; border-radius: 0 0 16px 16px; }
  .games-empty-status { margin-top: 38px; }
  .games-catalog { gap: 10px; }
  .games-release { min-height: 0; padding: 32px 23px; display: flex; flex-direction: column; align-items: stretch; border-radius: 16px; }
  .games-release h2, .games-stack h2 { font-size: clamp(32px, 10vw, 42px); }
  .games-release-copy > p:not(.games-status) { margin-top: 19px; font-size: 14px; }
  .games-release ul { margin-top: 25px; }
  .games-play { width: 100%; }
  .games-release-figure { width: min(58%, 220px); margin: 24px auto 0; }
  .games-2d-figure { width: min(58%, 220px); }
  .games-release-figure img { max-height: none; }
  .games-runner-figure figcaption, .games-stack-figure figcaption { margin: 8px -34px 0; }
  .games-principles { padding: 74px 0 94px; gap: 32px; }
  .games-principles h2 { font-size: clamp(38px, 11vw, 52px); }
  .games-principle-list p { grid-template-columns: 88px 1fr; gap: 12px; padding: 20px 0; }
}

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

@media (forced-colors: active) {
  .games-release, .games-category, .games-play, .games-back { border: 1px solid CanvasText; }
}

/* The game directories end with the same return and attribution row as the art pages. */
body .games-main:has(+ .games-footer) > :last-child { padding-bottom: 40px; }
.games-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 110px; padding: 20px var(--pad, 24px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.games-footer a { color: inherit; text-decoration: none; }
.games-footer > a { display: inline-flex; min-height: 44px; align-items: center; justify-self: start; }
.games-footer > span:last-child { justify-self: end; white-space: nowrap; }
.games-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 1040px) {
  .games-footer { grid-template-columns: 1fr auto; }
  .games-footer > span:nth-child(2) { display: none; }
}
@media (max-width: 700px) {
  .games-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding-block: 18px 24px; }
  .games-footer > span:last-child { font-size: 11px; }
}
