:root {
  --g31-page-bg: #fef08a;
  --g31-ink: #1e3a8a;
  --g31-cta: #ea580c;
  --g31-card-bg: #ffffff;
  --g31-ink-muted: #475569;
  --g31-ink-on-light: #334155;
  --g31-accent-text: #c2410c;
  --g31-border: 3px solid #1e3a8a;
  --g31-radius: 12px;
  --g31-radius-lg: 18px;
  --g31-header-h: 72px;
  --g31-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --g31-star-full: #eab308;
  --g31-star-glow: rgba(234, 179, 8, 0.4);
  --g31-star-empty: #94a3b8;
  --space-dark: var(--g31-page-bg);
  --space-blue: var(--g31-card-bg);
  --star-white: var(--g31-ink);
  --comet-cyan: var(--g31-cta);
  --nebula-pink: var(--g31-cta);
  --ink-muted: var(--g31-ink-muted);
  --line-soft: rgba(30, 58, 138, 0.25);
  --transition-fast: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  width: 100%;
  overflow-x: hidden;
}

body.g31-body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--g31-page-bg);
  color: var(--g31-ink);
  font-family: var(--g31-font);
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.g31-body:has(.g31-ad-slot--top) .anchorAdContent,
body.g31-body--detail:has(.g31-ad-slot--detail-top) .anchorAdContent {
  display: none !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--g31-font);
  font-weight: 800;
  margin-top: 0;
  color: var(--g31-ink);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

.g31-page-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.g31-main { flex: 1; }

/* CMS / 基座覆写：避免 special-grid 横向裁切、special-card-content 叠在缩略图上 */
.g31-body .daily-special,
.g31-body .g31-pick-section,
.g31-body .portholes {
  overflow-x: visible;
  white-space: normal;
}

.g31-body .special-grid.g31-chunky-grid,
.g31-body .special-grid.g31-chunky-grid--compact,
.g31-body .g31-podium.article-list {
  display: grid !important;
  flex-wrap: unset !important;
  white-space: normal !important;
  overflow-x: visible !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.g31-body .special-grid.g31-catalog-grid {
  display: grid !important;
  white-space: normal !important;
  overflow-x: visible !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.g31-body .g31-bookshelf.article-list {
  display: block !important;
  white-space: normal !important;
  overflow-x: visible !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.g31-body .special-card,
.g31-body .carousel-card {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.g31-body .g31-chunky-card.special-card {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
}

.g31-body .g31-chunky-card .special-card-content,
.g31-body .g31-chunky-body,
.g31-body .g31-chart-row .special-card-content,
.g31-body .g31-chart-body,
.g31-body .g31-podium-main .special-card-content,
.g31-body .g31-podium-side .special-card-content,
.g31-body .g31-podium-meta,
.g31-body .g31-spine .carousel-card-content,
.g31-body .g31-spine-meta,
.g31-body .g31-catalog-card .special-card-content,
.g31-body .g31-catalog-body {
  position: static !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  margin: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.g31-body .g31-catalog-card.special-card {
  display: flex !important;
  flex-direction: column !important;
}

.g31-body .g31-catalog-grid.list-view .g31-catalog-card.special-card,
.g31-body .games-grid.list-view .g31-catalog-card.special-card {
  flex-direction: row !important;
}

.g31-body .g31-podium-main.special-card,
.g31-body .g31-podium-side.special-card {
  display: flex !important;
  flex-direction: column !important;
}

.g31-body .g31-chart-row.special-card {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
}

/* Ads */
.g31-ad-slot {
  padding-top: 16px;
  padding-bottom: 16px;
  overflow: hidden;
}

.g31-ad-slot--top,
.g31-ad-slot--detail-top {
  padding-top: 12px;
}

.g31-ad-slot iframe,
.g31-ad-slot ins,
.g31-ad-slot > div {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.g31-legal-ad {
  padding-top: 16px;
}

.g31-page-wrap > .legal-container:first-child {
  margin-top: 24px;
}

.g31-page-wrap > * + .legal-container {
  margin-top: 24px;
}

.brief-comment-game {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.88rem;
  color: var(--g31-ink-muted);
}

.module-description {
  margin: 0 0 1.25rem;
  line-height: 1.6;
  color: var(--g31-ink-muted);
  max-width: 62ch;
}

.module-link-more {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--g31-cta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.module-link-more:hover {
  color: var(--g31-accent-text);
}

/* List title ellipsis */
.article-list .game-title,
.article-list .card-title,
.special-card .game-title,
.game-card .card-title,
.carousel-card .game-title {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.special-card-content,
.card-content {
  min-width: 0;
}

.article-list .special-card-content,
.article-list .carousel-card-content {
  padding: 12px 14px 16px;
}

/* Star rating */
.game-star,
.game-star .star-rating,
.star-rating {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  line-height: 1;
  font-size: 0.82rem;
}

.game-star .star-icon,
.game-star .star-full,
.game-star .star-empty,
.game-star .star-half,
.game-star .fa,
.game-star .fas,
.game-star .far,
.game-star i,
.star-rating .star-icon,
.star-rating .star-full,
.star-rating .star-empty,
.star-rating i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-style: normal;
  font-size: 1em;
}

.game-star .star-icon::before,
.game-star .star-full::before,
.game-star .fa-star::before,
.star-rating .star-icon::before,
.star-rating .star-full::before {
  content: "★";
  color: var(--g31-star-full);
}

.game-star .star-half::before,
.star-rating .star-half::before {
  content: "★";
  color: var(--g31-star-full);
  opacity: 0.55;
}

.game-star .star-empty::before,
.game-star .fa-star-o::before,
.game-star .far.fa-star::before,
.star-rating .star-empty::before {
  content: "☆";
  color: var(--g31-star-empty);
}

.game-star.game-star--detail-hero {
  display: inline-flex;
  margin: 0 0 12px;
}

.game-star.game-star--detail-hero .star-icon,
.game-star.game-star--detail-hero i {
  font-size: 1.1em;
}

.g31-podium-meta .game-star,
.g31-chunky-body .game-star,
.g31-chart-body .game-star,
.g31-spine-meta .game-star,
.g31-catalog-body .game-star {
  margin-top: 4px;
}

/* Header — yellow bar + folder tabs */
.g31-header-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--g31-page-bg);
  border-bottom: var(--g31-border);
  box-shadow: 0 4px 0 rgba(30, 58, 138, 0.08);
  overflow: visible;
}

.g31-header-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-height: var(--g31-header-h);
  padding-top: 8px;
  padding-bottom: 0;
}

.g31-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: 10px;
}

.g31-logo-text {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--g31-ink);
}

.logo-img {
  max-height: 36px;
  width: auto;
}

.g31-tab-nav {
  display: none;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: visible;
  padding-bottom: 0;
}

.g31-tab-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--g31-ink);
  background: #fde047;
  border: var(--g31-border);
  border-bottom: none;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.g31-tab-link:hover {
  background: #fff;
  transform: translateY(-2px);
}

.g31-tab-link.active {
  background: #fff;
  color: var(--g31-cta);
  z-index: 2;
  padding-bottom: 14px;
  margin-bottom: -2px;
}

.g31-tab-link.is-overflow-hidden {
  display: none !important;
}

.g31-nav-more {
  position: relative;
  flex-shrink: 0;
  z-index: 5;
}

.g31-nav-more.active {
  z-index: 20;
}

.g31-tab-more-btn {
  padding: 10px 14px;
  background: #fff;
  border: var(--g31-border);
  border-radius: 8px 8px 0 0;
  font-weight: 800;
  cursor: pointer;
}

.g31-nav-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: var(--g31-border);
  border-radius: 0 0 var(--g31-radius) var(--g31-radius);
  box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.12);
  z-index: 50;
}

.g31-nav-more.active .g31-nav-more-menu {
  display: flex;
  flex-direction: column;
}

.g31-nav-more.active .g31-tab-more-btn {
  background: #fde047;
  box-shadow: 0 2px 0 rgba(30, 58, 138, 0.15);
}

.g31-more-link {
  padding: 10px 14px;
  font-weight: 700;
  border-bottom: 1px solid #f1f5f9;
}

.g31-more-link:last-child { border-bottom: none; }

.g31-more-link:hover { background: var(--g31-page-bg); }

.g31-header-search {
  display: none;
  align-items: center;
  gap: 0;
  margin-left: auto;
  margin-bottom: 10px;
  background: #fff;
  border: var(--g31-border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.g31-search-input {
  border: none;
  outline: none;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.88rem;
  width: min(200px, 28vw);
  min-width: 120px;
  color: var(--g31-ink);
  background: transparent;
}

.g31-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: none;
  border-left: 2px solid var(--g31-ink);
  background: var(--g31-cta);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.g31-search-btn:hover { transform: scale(1.05); }

/* Mobile nav */
.g31-mobile-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 880;
  background: #fff;
  border-top: var(--g31-border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
}

.g31-mob-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--g31-ink-muted);
}

.g31-mob-link.active {
  color: var(--g31-cta);
}

.g31-mob-icon { font-size: 1.2rem; line-height: 1; }

/* Hero */
.g31-hero {
  padding: calc(var(--g31-header-h) + 20px) 0 28px;
  text-align: center;
}

.g31-hero-inner { max-width: 720px; }

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--g31-ink-on-light);
  max-width: 56ch;
  margin: 0 auto 20px;
}

.hero-subtitle p { margin: 0 0 8px; }

.g31-promise-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.g31-promise-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.g31-promise-icon { font-size: 1.25rem; flex-shrink: 0; }

/* Section head */
.g31-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.g31-section-title {
  font-size: 1.35rem;
  margin: 0;
}

.g31-pick-section {
  padding: 28px 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
  background: transparent;
}

.g31-top-section {
  padding-top: 8px;
}

/* Top chart — numbered leaderboard rows */
.g31-chart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g31-chart-list > li {
  margin: 0;
  padding: 0;
}

.g31-chart-row {
  grid-template-columns: 48px 160px minmax(0, 1fr) auto;
  grid-template-areas: "rank thumb body play";
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--g31-card-bg);
  border: var(--g31-border);
  border-radius: var(--g31-radius-lg);
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.1);
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.g31-chart-row:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.14);
}

.g31-chart-row--lead {
  box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.12);
}

.g31-chart-rank {
  grid-area: rank;
  align-self: center;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: var(--g31-border);
  font-weight: 900;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  background: var(--g31-page-bg);
  color: var(--g31-ink);
}

.g31-chart-list > li:nth-child(1) .g31-chart-rank { background: #fde047; }
.g31-chart-list > li:nth-child(2) .g31-chart-rank { background: #e2e8f0; }
.g31-chart-list > li:nth-child(3) .g31-chart-rank { background: #fdba74; }

.g31-chart-thumb {
  grid-area: thumb;
  width: 160px;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--g31-radius) - 2px);
  overflow: hidden;
  border: 2px solid rgba(30, 58, 138, 0.18);
  background: #e2e8f0;
}

.g31-chart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g31-chart-body {
  grid-area: body;
  padding: 0 !important;
  min-width: 0;
}

.g31-chart-body .brief-comment-game {
  margin-top: 4px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--g31-ink-on-light);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.g31-chart-play {
  grid-area: play;
  align-self: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: var(--g31-border);
  background: var(--g31-cta);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(30, 58, 138, 0.2);
}

.g31-chunky-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.g31-shelf-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* Podium */

.g31-podium {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 14px;
  align-items: end;
}

.g31-podium-main,
.g31-podium-side {
  display: flex;
  flex-direction: column;
  background: var(--g31-card-bg);
  border: var(--g31-border);
  border-radius: var(--g31-radius-lg);
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.12);
  transition: transform 0.2s ease;
  position: relative;
}

.g31-podium-main:hover,
.g31-podium-side:hover {
  transform: translateY(-4px);
}

.g31-podium-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.g31-podium-thumb--main { aspect-ratio: 16 / 9; }

.g31-podium-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g31-medal {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 40px;
  height: 36px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: var(--g31-border);
  font-weight: 900;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.g31-medal--gold {
  background: #fde047;
  color: var(--g31-ink);
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
}

.g31-medal--silver { background: #e2e8f0; }
.g31-medal--bronze { background: #fdba74; }

/* Chunky cards */
.g31-chunky-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.g31-chunky-card {
  display: grid;
  grid-template-columns: auto minmax(100px, 140px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  background: var(--g31-card-bg);
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.1);
  transition: transform 0.2s ease;
}

.g31-chunky-card:hover { transform: translateY(-3px); }

.g31-chunky-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--g31-cta);
  background: var(--g31-page-bg);
  border-right: var(--g31-border);
  min-width: 56px;
}

.g31-chunky-thumb {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.g31-chunky-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g31-chunky-body {
  padding: 12px 14px 14px 0;
  min-width: 0;
}

.g31-tag-chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--g31-page-bg);
  border: 2px solid var(--g31-ink);
  border-radius: 999px;
  color: var(--g31-ink);
}

/* Bookshelf carousel */
.g31-bookshelf-carousel {
  position: relative;
}

.g31-body .carousel-btn.g31-shelf-btn {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
}

.g31-shelf-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  background: #fff;
  color: var(--g31-ink);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(30, 58, 138, 0.12);
  transition: transform 0.2s ease;
}

.g31-shelf-btn:hover:not(:disabled) {
  background: #fde047;
  transform: translateY(-2px);
}

.g31-shelf-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.g31-bookshelf {
  position: relative;
  min-width: 0;
  padding-bottom: 8px;
}

.g31-bookshelf-plank {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: #b45309;
  border: var(--g31-border);
  border-radius: 4px;
  z-index: 0;
}

.g31-bookshelf-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 4px 22px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--g31-ink) var(--g31-page-bg);
}

.g31-spine {
  flex: 0 0 108px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  background: transparent;
  border: none;
  border-radius: 6px 6px 0 0;
  transition: transform 0.2s ease;
}

.g31-spine:hover { transform: translateY(-6px); }

.g31-spine[data-spine-index="0"] .g31-spine-cover { background: #fca5a5; }
.g31-spine[data-spine-index="1"] .g31-spine-cover { background: #93c5fd; }
.g31-spine[data-spine-index="2"] .g31-spine-cover { background: #86efac; }
.g31-spine[data-spine-index="3"] .g31-spine-cover { background: #fcd34d; }
.g31-spine[data-spine-index="4"] .g31-spine-cover { background: #c4b5fd; }
.g31-spine[data-spine-index="5"] .g31-spine-cover { background: #fda4af; }

.g31-spine-cover {
  height: 148px;
  border: var(--g31-border);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.g31-spine-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.g31-spine-meta {
  padding: 8px 4px 0;
  text-align: center;
}

.g31-spine-meta .game-title {
  font-size: 0.72rem;
  font-weight: 800;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.g31-spine-meta .game-star {
  font-size: 0.65rem;
  justify-content: center;
}

/* Genre grid */
.g31-genre-strip {
  padding: 32px 0 48px;
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

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

.g31-genre-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 12px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  font-weight: 800;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.1);
  transition: transform 0.2s ease;
}

.g31-genre-tile:hover { transform: scale(1.03); }

.g31-genre-tile[data-genre-index="0"] { background: #fecaca; }
.g31-genre-tile[data-genre-index="1"] { background: #bfdbfe; }
.g31-genre-tile[data-genre-index="2"] { background: #bbf7d0; }
.g31-genre-tile[data-genre-index="3"] { background: #fde68a; }
.g31-genre-tile[data-genre-index="4"] { background: #ddd6fe; }
.g31-genre-tile[data-genre-index="5"] { background: #fbcfe8; }

.g31-genre-emoji::before {
  font-size: 1.75rem;
  line-height: 1;
}

.g31-genre-tile[data-genre-index="0"] .g31-genre-emoji::before { content: "🎮"; }
.g31-genre-tile[data-genre-index="1"] .g31-genre-emoji::before { content: "🧩"; }
.g31-genre-tile[data-genre-index="2"] .g31-genre-emoji::before { content: "🏎️"; }
.g31-genre-tile[data-genre-index="3"] .g31-genre-emoji::before { content: "⚽"; }
.g31-genre-tile[data-genre-index="4"] .g31-genre-emoji::before { content: "🎯"; }
.g31-genre-tile[data-genre-index="5"] .g31-genre-emoji::before { content: "🧠"; }

.g31-genre-label { font-size: 0.88rem; }

/* Image placeholder */
.g31-img-ph {
  background: #e2e8f0;
  object-fit: cover;
}

/* Tags page */
.g31-tags-shell {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

.tags-box.g31-tags-shell > * + .g31-tags-layout,
.tags-box.g31-tags-shell > .g31-tags-layout:not(:last-child) {
  padding-bottom: 32px;
}

.g31-tags-band {
  background: var(--g31-page-bg);
  border-bottom: var(--g31-border);
  padding: 12px 0 20px;
}

/* 分类页：有顶广时不再叠加导航高度留白 */
.g31-body--tags .g31-tags-shell:has(.g31-ad-slot--top) .g31-ad-slot--top {
  padding-top: 10px;
  padding-bottom: 6px;
}

.g31-body--tags .g31-tags-shell:has(.g31-ad-slot--top) .g31-tags-band {
  padding-top: 8px;
}

/* 无顶广时保留 sticky 导航下间距 */
.g31-body--tags .g31-tags-shell:not(:has(.g31-ad-slot--top)) .g31-tags-band {
  padding-top: calc(var(--g31-header-h) + 12px);
}

.g31-tags-page-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 6px;
}

.g31-tags-sub {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--g31-ink-muted);
}

.g31-emoji-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.g31-emoji-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 10px 12px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  font-size: 0.72rem;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.g31-emoji-tile:hover,
.g31-emoji-tile.active {
  transform: translateY(-2px);
  background: #fde047;
}

.g31-emoji-tile.active {
  outline: 3px solid var(--g31-cta);
}

.g31-emoji-icon::before,
.g31-drawer-emoji::before {
  font-size: 1.4rem;
  line-height: 1;
}

.g31-emoji-tile[data-cat-index="0"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="0"]::before { content: "🎮"; }
.g31-emoji-tile[data-cat-index="1"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="1"]::before { content: "🧩"; }
.g31-emoji-tile[data-cat-index="2"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="2"]::before { content: "🏎️"; }
.g31-emoji-tile[data-cat-index="3"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="3"]::before { content: "⚽"; }
.g31-emoji-tile[data-cat-index="4"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="4"]::before { content: "🎯"; }
.g31-emoji-tile[data-cat-index="5"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="5"]::before { content: "🧠"; }
.g31-emoji-tile[data-cat-index="6"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="6"]::before { content: "🎨"; }
.g31-emoji-tile[data-cat-index="7"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="7"]::before { content: "🎵"; }
.g31-emoji-tile[data-cat-index="8"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="8"]::before { content: "🃏"; }
.g31-emoji-tile[data-cat-index="9"] .g31-emoji-icon::before,
.g31-drawer-link .g31-drawer-emoji[data-cat-index="9"]::before { content: "⭐"; }

.g31-tags-toolbar-wrap {
  padding-block: 16px 8px;
}

.g31-tags-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.g31-drawer-toggle {
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--g31-ink);
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  cursor: pointer;
}

.g31-view-toggle {
  display: flex;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  overflow: hidden;
  background: #fff;
}

.g31-view-btn {
  padding: 8px 14px;
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  background: transparent;
  color: var(--g31-ink-muted);
  cursor: pointer;
}

.g31-view-btn.is-active {
  background: var(--g31-cta);
  color: #fff;
}

.g31-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.g31-catalog-card {
  display: flex;
  flex-direction: column;
  background: var(--g31-card-bg);
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.08);
  transition: transform 0.2s ease;
}

.g31-catalog-card:hover { transform: translateY(-3px); }

.g31-catalog-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.g31-catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* List view */
.games-grid.list-view,
.g31-catalog-grid.list-view {
  grid-template-columns: 1fr;
}

.games-grid.list-view .g31-catalog-card,
.g31-catalog-grid.list-view .g31-catalog-card {
  flex-direction: row;
  align-items: stretch;
}

.games-grid.list-view .g31-catalog-thumb,
.g31-catalog-grid.list-view .g31-catalog-thumb {
  flex: 0 0 38%;
  max-width: 38%;
  aspect-ratio: 16 / 10;
}

.games-grid.list-view .g31-catalog-body,
.g31-catalog-grid.list-view .g31-catalog-body {
  flex: 1;
  padding: 12px 14px 16px;
}

/* Drawer */
.g31-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  border: none;
  background: rgba(30, 58, 138, 0.4);
  cursor: pointer;
}

.g31-tags-drawer {
  position: fixed;
  inset: 0;
  z-index: 960;
  pointer-events: none;
  visibility: hidden;
}

body.g31-drawer-open .g31-tags-drawer {
  visibility: visible;
  pointer-events: none;
}

body.g31-drawer-open .g31-drawer-panel {
  pointer-events: auto;
}

.g31-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  border-left: var(--g31-border);
  box-shadow: -8px 0 24px rgba(30, 58, 138, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

body.g31-drawer-open .g31-drawer-panel {
  transform: translateX(0);
}

.g31-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: var(--g31-border);
  background: var(--g31-page-bg);
}

.g31-drawer-head h2 { margin: 0; font-size: 1.1rem; }

.g31-drawer-close {
  width: 36px;
  height: 36px;
  border: var(--g31-border);
  border-radius: 50%;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.g31-drawer-nav {
  overflow-y: auto;
  padding: 12px;
}

.g31-drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  font-weight: 700;
  border-radius: var(--g31-radius);
  border: 2px solid transparent;
}

.g31-drawer-link:hover,
.g31-drawer-link.active {
  background: var(--g31-page-bg);
  border-color: var(--g31-ink);
}

.g31-empty-inline {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius-lg);
}

/* Detail — comic panel */
.g31-detail-wrap {
  padding-top: 16px;
  padding-bottom: 40px;
}

/* 详情页：有顶广时收紧广告与面包屑间距 */
.g31-body--detail:has(.g31-ad-slot--detail-top) .g31-ad-slot--detail-top {
  padding-top: 10px;
  padding-bottom: 6px;
}

.g31-body--detail:has(.g31-ad-slot--detail-top) .g31-detail-wrap {
  padding-top: 8px;
}

.g31-body--detail:not(:has(.g31-ad-slot--detail-top)) .g31-detail-wrap {
  padding-top: calc(var(--g31-header-h) + 12px);
}

.g31-breadcrumb {
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 700;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-list a {
  color: var(--g31-cta);
  text-decoration: underline;
}

.g31-comic-panel {
  max-width: 800px;
  margin: 0 auto;
}

.g31-comic-frame {
  background: #fff;
  border: 4px solid var(--g31-ink);
  border-radius: var(--g31-radius-lg);
  box-shadow: 10px 10px 0 rgba(30, 58, 138, 0.15);
  overflow: hidden;
}

.g31-comic-cover {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  border-bottom: var(--g31-border);
}

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

.g31-comic-body {
  padding: 20px 22px 24px;
  text-align: center;
}

#game-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 8px;
}

.g31-detail-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.g31-tag-pill {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--g31-page-bg);
  border: 2px solid var(--g31-ink);
  border-radius: 999px;
}

.g31-btn-play,
.btn-launch.g31-btn-play {
  display: inline-block;
  padding: 16px 48px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--g31-ink);
  background: #fde047;
  border: var(--g31-border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--g31-ink);
  transition: transform 0.2s ease;
}

.g31-btn-play:hover,
.btn-launch.g31-btn-play:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--g31-ink);
}

.g31-detail-prose {
  margin-top: 28px;
  text-align: left;
}

.g31-detail-block {
  margin-bottom: 24px;
  padding: 18px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
}

.g31-detail-block h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.g31-detail-lead {
  margin: 0;
  color: var(--g31-ink-on-light);
}

.rich-content {
  color: var(--g31-ink-on-light);
  line-height: 1.65;
}

.g31-related { padding: 24px 0 40px; }

.g31-chunky-grid--compact .g31-chunky-card--sm {
  grid-template-columns: auto minmax(72px, 100px) minmax(0, 1fr);
}

.g31-chunky-card--sm .g31-chunky-rank {
  font-size: 1.5rem;
  min-width: 40px;
}

/* Game modal */
.g31-game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(30, 58, 138, 0.55);
}

.g31-modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 10;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius);
  overflow: hidden;
}

.g31-modal-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.g31-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: var(--g31-border);
  border-radius: 50%;
  background: var(--g31-page-bg);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Empty states */
.game-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius-lg);
  margin: 24px 0;
}

.game-empty-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 8px;
}

/* Footer */
.g31-footer {
  margin-top: auto;
  background: var(--g31-ink);
  color: #fff;
  border-top: var(--g31-border);
}

.g31-footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-block: 32px 24px;
}

.g31-footer-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fde047;
  margin-bottom: 8px;
}

.g31-footer-name {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.g31-footer-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
  max-width: 48ch;
}

.g31-footer-desc p { margin: 0 0 8px; }

.g31-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.g31-social-link {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #fde047;
  border-radius: 999px;
  color: #fde047;
}

.g31-social-link:hover {
  background: #fde047;
  color: var(--g31-ink);
}

.g31-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.g31-footer-nav a {
  font-weight: 700;
  font-size: 0.88rem;
  color: #e2e8f0;
}

.g31-footer-nav a:hover { color: #fde047; }

.g31-footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 14px;
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
}

.g31-footer-bar p { margin: 0; }

.g31-back-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 850;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: var(--g31-border);
  border-radius: 50%;
  color: var(--g31-ink);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.15);
}

.g31-back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Legal */
.legal-container {
  max-width: 800px;
  margin-inline: auto;
  margin-bottom: 48px;
  padding: 28px 24px;
  background: #fff;
  border: var(--g31-border);
  border-radius: var(--g31-radius-lg);
  color: var(--g31-ink-on-light);
  line-height: 1.65;
}

.legal-container h1,
.legal-container h2,
.legal-container h3 {
  color: var(--g31-ink);
}

.legal-container a {
  color: var(--g31-cta);
  font-weight: 700;
}

/* Desktop */
@media (min-width: 768px) {
  .g31-bookshelf-carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .g31-shelf-btn {
    display: inline-flex;
    align-self: center;
  }

  .g31-bookshelf-track {
    scrollbar-width: none;
  }

  .g31-bookshelf-track::-webkit-scrollbar {
    display: none;
  }

  .g31-tab-nav { display: flex; }
  .g31-header-search { display: flex; }
  .g31-mobile-bar { display: none; }
  body.g31-body { padding-bottom: 0; }
  .g31-tags-shell { padding-bottom: 32px; }
  .g31-back-top { bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
  .g31-drawer-toggle { display: none; }
  .g31-promise-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g31-genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g31-footer-main {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .g31-footer-nav { justify-content: flex-end; }
}

@media (min-width: 900px) {
  .g31-genre-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 768px) {
  /* 分类页：移动端用 All genres 抽屉，隐藏顶部 emoji 分类网格 */
  .g31-body--tags .g31-emoji-tiles {
    display: none;
  }

  .g31-body--tags .g31-tags-sub {
    margin-bottom: 0;
  }

  .g31-body--tags .g31-tags-band {
    padding-bottom: 12px;
  }

  .g31-body--tags .g31-tags-toolbar-wrap {
    padding-block: 12px 8px;
    padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  }

  .g31-header-row {
    align-items: center;
    padding-bottom: 10px;
  }

  .g31-tab-nav { display: none; }

  .g31-hero {
    padding-top: calc(var(--g31-header-h) + 12px);
  }

  .g31-pick-section {
    padding-block: 20px;
  }

  .g31-top-section {
    padding-top: 4px;
  }

  .g31-chart-list {
    gap: 8px;
  }

  .g31-chart-row,
  .g31-chart-row--lead {
    grid-template-columns: 38px minmax(88px, 30vw) minmax(0, 1fr);
    grid-template-areas: "rank thumb body";
    gap: 10px;
    padding: 10px 12px;
  }

  .g31-chart-row--lead .g31-chart-thumb,
  .g31-chart-thumb {
    width: auto;
    align-self: stretch;
    aspect-ratio: auto;
    min-height: 72px;
  }

  .g31-chart-thumb img {
    width: 100%;
    height: 100%;
    min-height: 72px;
    object-fit: cover;
  }

  .g31-chart-rank {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
  }

  .g31-chart-body .brief-comment-game {
    -webkit-line-clamp: 2;
    font-size: 0.78rem;
    margin-top: 2px;
  }

  .g31-chart-play {
    display: none;
  }

  .g31-podium {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .g31-podium-side--left { order: 2; }
  .g31-podium-main { order: 1; }
  .g31-podium-side--right { order: 3; }

  .g31-body .g31-podium-main.special-card,
  .g31-body .g31-podium-side.special-card {
    display: grid !important;
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 0;
    min-height: 96px;
  }

  .g31-body .g31-podium-main.special-card {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 104px;
  }

  .g31-podium-thumb,
  .g31-podium-thumb--main {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .g31-podium-thumb img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
  }

  .g31-podium-meta,
  .g31-body .g31-podium-main .special-card-content,
  .g31-body .g31-podium-side .special-card-content {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding: 10px 12px 10px 14px !important;
    min-width: 0;
  }

  .g31-podium-side .brief-comment-game,
  .g31-podium-main .brief-comment-game {
    -webkit-line-clamp: 2;
    font-size: 0.8rem;
  }

  .g31-medal {
    top: 6px;
    left: 6px;
    min-width: 32px;
    height: 28px;
    padding: 0 4px;
    font-size: 0.72rem;
  }

  .g31-medal--gold {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .g31-chunky-grid,
  .g31-chunky-grid--compact {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .g31-body .g31-chunky-card.special-card {
    grid-template-columns: 34px 92px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: stretch;
    gap: 0;
    padding-right: 10px;
    min-height: 88px;
  }

  .g31-chunky-rank {
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    min-width: 34px;
    max-width: 34px;
    padding: 0 2px;
    font-size: 0.95rem;
    border-right: var(--g31-border);
    border-bottom: none;
  }

  .g31-chunky-thumb {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    width: 92px;
    max-width: 92px;
    height: 100%;
    min-height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    overflow: hidden;
  }

  .g31-chunky-thumb img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
  }

  .g31-chunky-body,
  .g31-body .g31-chunky-card .g31-chunky-body {
    grid-column: 3;
    grid-row: 1;
    padding: 8px 0 8px 12px !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .g31-chunky-body .g31-card-tags {
    margin: 0;
    gap: 4px;
  }

  .g31-chunky-body .g31-tag-chip {
    padding: 1px 6px;
    margin: 0 4px 0 0;
    font-size: 0.62rem;
  }

  .g31-chunky-body .game-title {
    font-size: 0.82rem;
    margin: 0;
  }

  .g31-chunky-body .game-star {
    margin: 0;
    font-size: 0.65rem;
  }

  .g31-chunky-body .brief-comment-game {
    display: none;
  }

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

  .games-grid.list-view .g31-catalog-thumb,
  .g31-catalog-grid.list-view .g31-catalog-thumb {
    flex: 0 0 36%;
    max-width: 36%;
    width: auto;
    align-self: stretch;
  }

  .g31-detail-wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .g31-comic-panel { max-width: 100%; }
}

@media (max-width: 480px) {
  .g31-body .g31-podium-main.special-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 96px;
  }

  .g31-body .g31-podium-side.special-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 88px;
  }

  .g31-body .g31-chunky-card.special-card {
    grid-template-columns: 30px 80px minmax(0, 1fr) !important;
    min-height: 80px;
  }

  .g31-chunky-rank {
    min-width: 30px;
    max-width: 30px;
    font-size: 0.88rem;
  }

  .g31-chunky-thumb {
    width: 80px;
    max-width: 80px;
  }
}
