:root {
  --bg: #ffffff;
  --panel: #f5f7ff;
  --panel-2: #eef1ff;
  --text: #1a1a2e;
  --muted: #5a5a7a;
  --line: rgba(0, 0, 0, 0.12);
  --brand: #0066cc;
  --brand-2: #8b5cff;
  --ok: #00994d;
  --warn: #cc6600;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
  --r: 14px;
  --ring: rgba(0, 102, 204, 0.15);
  --header-h: 68px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: var(--bg);
}
body.nav-open {
  overflow: hidden;
}

::selection {
  background: rgba(0, 102, 204, 0.15);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.section {
  padding: 20px 0;
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 10px;
  top: -40px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 50;
}
.skip-link:focus {
  top: 10px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 25%);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}
.brand-logo {
  height: clamp(28px, 4.8vw, 48px);
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .brand-logo {
    height: 40px;
    max-width: 140px;
  }
}
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  position: relative;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 640px) {
  .header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .header-nav {
    order: 0;
    justify-content: flex-start;
  }
  .brand {
    order: 1;
  }
  .header-actions {
    order: 2;
    margin-left: auto;
  }
  .header-nav .nav-toggle {
    margin-right: 6px;
  }
}
.header-searchbar {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  width: 100%;
}
.header-searchbar input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 0;
  min-width: 0;
}
.header-searchbar input::placeholder {
  color: rgba(90, 90, 122, 0.85);
}
.header-searchbar input:focus,
.header-searchbar input:focus-visible {
  box-shadow: none !important;
  outline: none !important;
}
.header-searchbar:focus-within {
  border-color: rgba(0, 102, 204, 0.45);
}

.nav-toggle {
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 25px;
  width: 40px;
  height: 40px;
}
.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}
.nav-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
.nav-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nav-links--inline {
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}
.more {
  position: relative;
}
.more.is-hidden {
  display: none;
}
.more-toggle {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}
.nav-inline .more-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}
.nav-inline .more-toggle span[aria-hidden="true"] {
  color: var(--ok);
}
.more-menu {
  position: absolute;
  right: 0;
  top: 46px;
  min-width: 220px;
  max-width: 320px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(245, 247, 255, 0.98);
  box-shadow: var(--shadow);
  display: none;
}
.more-menu.is-open {
  display: block;
}
.more-menu a {
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--muted);
}
.more-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}
.more-menu a.is-active {
  background: rgba(0, 102, 204, 0.1);
  border: 1px solid rgba(0, 102, 204, 0.22);
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
}
.nav-links a:hover {
  border-color: var(--line);
  color: var(--text);
}
.nav-links a.is-active {
  border-color: rgba(0, 102, 204, 0.35);
  color: var(--text);
  background: rgba(0, 102, 204, 0.08);
}

/* Header nav pills (inline) */
.nav-inline .nav-links {
  gap: 6px;
  flex-wrap: nowrap;
}
.nav-inline .nav-links a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.1px;
}
.nav-inline .nav-links a:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}
.nav-inline .nav-links a.is-active {
  background: rgba(0, 102, 204, 0.12);
  border-color: rgba(0, 102, 204, 0.22);
}

/* Desktop dropdown "drawer" (opened via hamburger) */
.nav-drawer {
  position: absolute;
  left: 0;
  top: 54px;
  width: min(560px, calc(100vw - 32px));
  background: rgba(245, 247, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.nav-drawer.is-open {
  display: flex;
}
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nav-drawer-head .icon-btn[data-js="nav-close"] {
  width: 48px;
  height: 48px;
  font-size: 28px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
.nav-title {
  font-weight: 900;
}

/* Header search popover (icon -> input) */
.header-search-wrap {
  position: relative;
}
.search-popover {
  position: absolute;
  right: 0;
  top: 54px;
  width: min(460px, calc(100vw - 32px));
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(245, 247, 255, 0.98);
  box-shadow: var(--shadow);
  display: none;
}
.search-popover.is-open {
  display: block;
}
.search-popover-form {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-popover-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  outline: none;
}
.search-popover-form input:focus {
  border-color: rgba(0, 102, 204, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08);
}

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 460px;
  flex: 1;
}
.search--drawer {
  margin-left: 0;
  max-width: none;
  min-width: 0;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  outline: none;
}
.search input:focus {
  border-color: rgba(0, 102, 204, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08);
}

/* Buttons / Links */
.btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}
.btn:hover {
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
.btn-primary {
  border-color: rgba(0, 102, 204, 0.45);
  background: linear-gradient(
    135deg,
    rgba(0, 102, 204, 0.18),
    rgba(139, 92, 255, 0.14)
  );
}
.link {
  color: var(--brand);
  font-weight: 600;
}
.link:hover {
  text-decoration: underline;
}
.link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
  border-radius: 10px;
}
.icon-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}
a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
  border-radius: 10px;
}
.link-btn {
  margin-top: 10px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 22px 0 10px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}
.hero-inner--single {
  grid-template-columns: 1fr;
}
.hero-copy {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 18px;
  box-shadow: var(--shadow);
}
.hero-copy h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.3px;
}
.hero-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* Hot games icon strip (after header, all pages) */
.hot-strip {
  padding: 12px 0 4px;
}
.hot-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hot-arrow {
  width: 100px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}
.hot-arrow[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.hot-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  border-radius: 20px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.06);
  scrollbar-width: none;
  cursor: grab;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
}
.hot-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.hot-viewport.is-dragging {
  cursor: grabbing;
}
.hot-viewport,
.hot-track,
.hot-item {
  user-select: none;
}
.hot-viewport.is-dragging {
  user-select: none;
}
.hot-track {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hot-item {
  flex: 0 0 auto;
  display: block;
  width: 82px;
  height: 82px;
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  scroll-snap-align: start;
  cursor: grab;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.hot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
  -webkit-user-drag: none;
  user-select: none;
}
.hot-item:hover {
  border-color: rgba(0, 102, 204, 0.25);
}
.hot-item:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px var(--ring),
    0 12px 26px rgba(0, 0, 0, 0.15);
}
.hot-item.is-pressed {
  border-color: rgba(0, 102, 204, 0.55);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.2),
    0 0 0 4px rgba(0, 102, 204, 0.16);
}
.hot-viewport.is-dragging .hot-item {
  cursor: grabbing;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}
.chip small {
  color: var(--muted);
  font-weight: 600;
}

/* Layout */
.layout-2col {
  display: grid;
  grid-template-columns: 1.55fr 0.75fr;
  gap: 16px;
  align-items: start;
}
.content-col {
  min-width: 0;
}
.sidebar-col {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  display: grid;
  gap: 14px;
}

.page-game .sidebar-box--sticky {
  position: sticky;
  top: calc(var(--header-h) + 14px);
}

.home-top {
  padding-top: 18px;
  padding-bottom: 8px;
}
.home-top-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 16px;
  align-items: start;
}
.home-top-main {
  min-width: 0;
}
.home-top-side {
  position: sticky;
  top: calc(var(--header-h) + 14px);
}

/* Desktop: keep the sidebar on the right without forcing extra height */
@media (min-width: 981px) {
  .home-top {
    position: relative;
  }
  .home-top-grid {
    grid-template-columns: 1fr;
  }
  .home-top-main {
    padding-right: 320px;
  }
  .home-top-side {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
  }
}

.home-hot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.hot-tile {
  position: relative;
  display: block;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.hot-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 102, 204, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}
.hot-tile:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px var(--ring),
    0 18px 40px rgba(0, 0, 0, 0.25);
}
.hot-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
  -webkit-user-drag: none;
  user-select: none;
}
.hot-tile-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.16);
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sidebar-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.1px;
}
.type-list {
  display: grid;
  gap: 10px;
}
.type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.type-item:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.12);
}
.type-item:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
.type-icon {
  width: 22px;
  height: 22px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(0, 102, 204, 0.95),
    rgba(139, 92, 255, 0.85)
  );
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

/* Cards / Grid */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head.tight {
  margin-bottom: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
}
.sections {
  display: grid;
  gap: 18px;
}

.home-sections-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 24px;
  align-items: start;
}
.home-sections-layout > * {
  min-width: 0;
}
.home-sections-ad {
  position: static;
  margin-left: 10px;
  align-self: stretch;
  display: flex;
}
.home-sections-ad > .ad-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.home-sections-ad > .ad-card .ad-body {
  flex: 1;
}

/* Collapse the right-side ad earlier so the game strips don't get squeezed */
@media (max-width: 980px) {
  .home-sections-layout {
    grid-template-columns: 1fr;
  }
  .home-sections-ad {
    position: static;
    margin-top: 14px;
    margin-left: 0;
  }
}

.type-strip .section-head h2 {
  font-size: 18px;
}
.strip-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow: auto;
  padding: 10px 4px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.strip-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.strip-row--wrap {
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0;
}
.strip-row--wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.strip-game {
  flex: 0 0 auto;
  width: clamp(84px, 8.2vw, 110px);
  color: var(--text);
}
.strip-game img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
}
.strip-game:hover img {
  border-color: rgba(0, 102, 204, 0.25);
}
.strip-game:focus-visible {
  outline: 0;
}
.strip-game:focus-visible img {
  box-shadow:
    0 0 0 4px var(--ring),
    0 12px 26px rgba(0, 0, 0, 0.15);
}
.strip-game-name {
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-game-stars {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: 12px;
  color: var(--warn);
}
.strip-game-count {
  color: var(--text);
}

.page-type .page-head {
  margin-bottom: 12px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.type-grid--main {
  /* Desktop: always 9 games per row */
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
.type-grid--hot {
  /* Desktop: always 6 games per row */
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Medium screens: avoid overly-small tiles */
@media (max-width: 1120px) {
  .type-grid--main {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  /* Tablet/Small desktop: avoid squeezing the 3-column game header (hero + ad + similar). */
  .page-game .game-top-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  }
  .page-game .game-hero {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .page-game .ad-card.ad-top {
    grid-column: 2;
    grid-row: 1;
  }
  .page-game .game-similar {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 1024px) {
  /* Header: give nav more breathing room by moving search to its own row */
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }
  .header-nav {
    justify-content: flex-start;
  }
  .header-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .header-searchbar {
    width: 100%;
  }

  /* Header pills: slightly smaller so the row stays balanced */
  .nav-inline .nav-links a {
    padding: 0 12px;
  }
  .more-toggle {
    padding: 0 10px;
  }

  /* Home: hot grid shouldn't be 5-up at 1024 (tiles get too small) */
  .home-hot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Home: collapse the right-side ad earlier so the left sections keep clean spacing */
  .home-sections-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .home-sections-ad {
    position: static;
    margin-top: 14px;
    margin-left: 0;
  }

  /* Type page: make icon grids less dense for 1024px */
  .type-grid--main {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .type-grid--hot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Game page: keep the 2-column layout from the 1120px breakpoint, but reduce squeeze */
  .page-game .game-top-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  }
}
.type-game {
  display: block;
  color: var(--text);
  min-width: 0;
}
.type-game img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
}
.type-game:hover img {
  border-color: rgba(0, 102, 204, 0.25);
}
.type-game:focus-visible {
  outline: 0;
}
.type-game:focus-visible img {
  box-shadow:
    0 0 0 4px var(--ring),
    0 12px 26px rgba(0, 0, 0, 0.15);
}
.type-game-name {
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.type-game-stars {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: 12px;
  color: var(--warn);
}
.type-game-stars .type-game-count {
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.grid--stable {
  /* Keeps card size stable when filtering reduces the item count */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 102, 204, 0.25);
}
.card-media {
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 10px 10px 12px;
}
.card-title {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
  margin: 0 0 8px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
  font-size: 12px;
}
.stars {
  color: var(--warn);
  letter-spacing: 0.6px;
}

.stack {
  display: grid;
  gap: 10px;
}
.mini {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  padding: 10px;
}
.mini img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
}
.mini-title {
  font-weight: 800;
  font-size: 13px;
  margin: 0;
}
.mini-sub {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.ad-card,
.ad-inline {
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.18);
  z-index: 2;
  pointer-events: none;
}
.ad-body {
  padding: 48px 16px 18px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.ad-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}
.ad-subtitle {
  color: var(--muted);
  font-size: 13px;
}
.ad-inline {
  margin: 14px 0;
}
.ad-strip {
  padding: 48px 14px 14px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.home-ad-card,
.ad-card,
.ad-inline {
  max-width: 100%;
  overflow: hidden;
  min-width: 0;
}

/* Desktop: let larger creatives render without being clipped */
@media (min-width: 769px) {
  .home-ad-card,
  .ad-card,
  .ad-inline {
    overflow: visible;
  }
  .gpt-ad-slot {
    overflow: visible;
    min-height: 0;
  }
}

/* Common ad elements (AdSense uses <ins> + injected <iframe>) */
.home-ad-card iframe,
.ad-card iframe,
.ad-inline iframe,
.home-ad-card ins,
.ad-card ins,
.ad-inline ins,
.home-ad-card img,
.ad-card img,
.ad-inline img,
.home-ad-card object,
.ad-card object,
.ad-inline object,
.home-ad-card embed,
.ad-card embed,
.ad-inline embed {
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

.home-ad-card iframe,
.ad-card iframe,
.ad-inline iframe {
  display: block;
  border: 0;
}

.home-ad-card ins,
.ad-card ins,
.ad-inline ins {
  display: block !important;
  overflow: hidden;
}

.home-ad {
  padding: 10px 0 8px;
}
.home-ad--inline {
  padding: 0;
  margin-top: 14px;
}
.home-ad-card {
  position: relative;
  min-height: 140px;
  border-radius: 22px;
  border: 0;
  background: rgba(0, 0, 0, 0.04);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.15);
  max-width: 100%;
  overflow: hidden;
  min-width: 0;
}
.home-ad--inline .home-ad-card {
  min-height: 190px;
}
.home-ad-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: rgba(26, 26, 46, 0.72);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.gpt-ad-slot {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}
.gpt-ad-slot:empty::before {
  content: "Advertisement";
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.03);
}

/* Mobile: prevent long creatives from overlapping the badge */
@media (max-width: 768px) {
  .gpt-ad-slot {
    max-height: 320px;
    max-width: 100%;
    min-height: 140px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }
  .ad-body,
  .ad-strip {
    align-items: center;
  }
  .gpt-ad-slot::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .gpt-ad-slot > * {
    max-width: 100% !important;
  }
}

.page-head {
  margin-bottom: 10px;
}
.page-title h1 {
  margin: 6px 0 4px;
  font-size: 28px;
  letter-spacing: -0.3px;
}
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--muted);
}
.breadcrumbs a:hover {
  color: var(--text);
}
.breadcrumbs .sep {
  opacity: 0.5;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.search-inline input {
  width: 260px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  outline: none;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0 10px;
}

.game-top-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) minmax(
      260px,
      340px
    );
  gap: 16px;
  align-items: start;
  padding-top: 6px;
}
.game-top-layout > * {
  min-width: 0;
}
.game-similar {
  align-self: start;
}
.ad-card.ad-top {
  display: flex;
  flex-direction: column;
}
.ad-card.ad-top .ad-body {
  min-height: 210px;
}
.ad-top-label {
  padding: 10px 10px 6px;
  text-align: center;
  font-weight: 900;
  color: rgba(26, 26, 46, 0.86);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.16);
}
.ad-top .ad-body {
  padding-top: 18px;
}

.game-hero {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
  box-shadow: var(--shadow);
}
.game-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.game-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.3px;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 1000;
  color: var(--warn);
}
.rating-inline .n {
  color: var(--text);
  font-weight: 1000;
}
.meta-type {
  color: rgba(26, 26, 46, 0.9);
  font-weight: 900;
  font-size: 14px;
}
.meta-type:hover {
  text-decoration: underline;
}
.meta-safe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-weight: 900;
  font-size: 14px;
  order: 2;
  flex: 0 0 100%;
  margin-top: 4px;
}
.meta-safe .safe-ic {
  width: 16px;
  height: 16px;
  display: block;
}

.spec-card {
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 14px;
  grid-column: 1 / -1;
}
.spec-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 8px 0;
}
.spec-row + .spec-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.spec-k {
  color: rgba(26, 26, 46, 0.88);
  font-weight: 900;
}
.spec-v {
  color: rgba(26, 26, 46, 0.92);
  font-weight: 800;
}
.game-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  white-space: nowrap;
}
.tag-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.info-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.03);
}
.info-k {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.info-v {
  font-weight: 900;
  margin-top: 4px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.safety-box {
  margin-top: 12px;
  border: 1px solid rgba(0, 153, 77, 0.25);
  background: rgba(0, 153, 77, 0.05);
  border-radius: 14px;
  padding: 10px;
}
.safety-title {
  font-weight: 900;
  margin-bottom: 4px;
  color: #004d26;
}
.prose {
  color: var(--muted);
  line-height: 1.7;
}
.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 1.2em;
}
.prose li {
  margin: 6px 0;
}
.prose.is-collapsed {
  display: -webkit-box;
  line-clamp: 7;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.about-section {
  padding-top: 24px;
}
.about-head {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.about-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.2px;
}
.about-prose {
  color: rgba(26, 26, 46, 0.92);
  font-size: 14px;
}
.about-prose p {
  margin: 0 0 12px;
}
.about-prose p:last-child {
  margin-bottom: 0;
}
.about-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.about-toggle {
  min-width: 160px;
  height: 44px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
}
.gallery {
  display: flex;
  gap: 14px;
  overflow: auto;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.gallery.is-dragging {
  cursor: grabbing;
}
.gallery::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.gallery img {
  flex: 0 0 auto;
  width: clamp(360px, 52vw, 620px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  user-select: none;
  -webkit-user-drag: none;
}

.get-game {
  display: grid;
  gap: 12px;
}

/* Get the Game (match reference screenshot) */
.get-section {
  padding-top: 22px;
}
.get-head {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.get-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.2px;
}
.get-safety {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}
.get-safety-ic {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 153, 77, 0.14);
  color: var(--ok);
  flex: 0 0 auto;
}
.get-safety-ic img {
  width: 22px;
  height: 22px;
  display: block;
}
.get-safety-text {
  min-width: 0;
}
.get-safety-title {
  font-weight: 1000;
  color: rgba(26, 26, 46, 0.95);
  line-height: 1.15;
}
.get-safety-sub {
  color: rgba(26, 26, 46, 0.85);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.get-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.get-actions.is-single {
  grid-template-columns: 1fr;
}
.btn-store {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  justify-content: center;
  gap: 10px;
  font-weight: 1000;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}
.btn-store .store-ic {
  width: 18px;
  height: 18px;
  display: block;
}

.ad-inline--banner {
  margin: 16px 0;
}
.ad-inline--banner .ad-strip {
  min-height: 120px;
  align-items: center;
  text-align: center;
}
.ad-inline--banner-bottom .ad-strip {
  min-height: 110px;
}

.side-stack {
  gap: 10px;
}
.side-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  padding: 10px;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}
.side-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 102, 204, 0.25);
}
.side-row:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
.side-row img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
  flex: 0 0 auto;
}
.side-row-title {
  font-weight: 900;
  font-size: 13px;
  line-height: 1.2;
}
.side-row-rate {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 1000;
  color: var(--warn);
  white-space: nowrap;
}
.side-row-rate .n {
  color: var(--text);
  font-weight: 900;
}

.sidebar-box {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--r);
  padding: 12px;
}
.sidebar-box--sticky {
  position: sticky;
  top: calc(var(--header-h) + 14px);
}
.sidebar-col .sidebar-box .section-head.tight {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.sidebar-col .sidebar-box .section-head.tight h2 {
  font-size: 22px;
  letter-spacing: -0.2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0)), #f0f2f8;
}

.footer-top {
  padding: 10px 0 8px;
}
.footer-top-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.footer-brandblock {
  min-width: 0;
}
.footer-brandlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.footer-brandtext {
  font-weight: 1000;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.footer-lead {
  margin: 8px 0 0;
  max-width: 74ch;
  color: rgba(26, 26, 46, 0.92);
  font-size: 12px;
  line-height: 1.5;
}
.footer-illustration {
  justify-self: end;
  width: min(400px, 100%);
}
.footer-illustration img,
.footer-illustration svg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.footer-bottom {
  padding: 8px 0 10px;
  border-top: 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: rgba(26, 26, 46, 0.75);
}
.footer-nav a {
  color: rgba(26, 26, 46, 0.75);
}
.footer-nav a:hover {
  color: var(--text);
}
.footer-copy {
  color: rgba(26, 26, 46, 0.78);
  font-size: 13px;
  text-align: right;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  cursor: pointer;
}
.icon-btn.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.icon-btn.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}
.icon-btn.nav-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--ring);
}

/* Responsiveness */
@media (max-width: 860px) {
  :root {
    --header-h: 68px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .layout-2col {
    grid-template-columns: 1fr;
  }
  .sidebar-col {
    position: static;
  }
  .game-top-layout {
    grid-template-columns: 1fr;
  }
  .search {
    min-width: 0;
    max-width: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .icon-btn.nav-toggle {
    display: inline-flex;
  }
  .header-nav {
    justify-content: flex-start;
  }
  .nav-inline {
    display: none;
  }
  .search-popover {
    display: none !important;
  }
  .header-searchbar {
    width: 100%;
  }

  /* Drawer becomes fixed panel on tablet/mobile */
  .nav-drawer {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--header-h) + 10px);
    width: auto;
    background: rgba(245, 247, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100dvh - var(--header-h) - 24px);
    overflow: auto;
    z-index: 60;
  }
  .nav-drawer.is-open {
    display: flex;
  }
  .nav-drawer-head {
    display: flex;
  }

  .home-top-grid {
    grid-template-columns: 1fr;
  }
  .home-top-side {
    position: static;
  }
  .home-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-ad-card {
    min-height: 124px;
  }
  .home-ad--inline .home-ad-card {
    min-height: 165px;
  }

  .home-sections-layout {
    grid-template-columns: 1fr;
  }
  .home-sections-ad {
    position: static;
    margin-top: 14px;
    margin-left: 0;
  }

  .home-sections-layout .type-strip .strip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 10px 4px 4px;
  }
  .home-sections-layout .type-strip .strip-game {
    width: 100%;
  }

  .footer-top-inner {
    grid-template-columns: 1fr;
  }
  .footer-illustration {
    justify-self: start;
    max-width: 520px;
  }
  .footer-copy {
    text-align: left;
  }

  /* Type grids: larger tiles on tablet/mobile */
  .type-grid {
    gap: 12px;
  }
  .type-grid--main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .type-grid--hot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .header-inner {
    gap: 10px;
  }
  .header-inner {
    grid-template-columns: auto 1fr;
  }
  .header-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .header-searchbar {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .search:not(.search--drawer) {
    display: none;
  }
  .search.search--drawer {
    display: flex;
  }
  .search-popover {
    display: none !important;
  }
  .nav-drawer-head {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links a {
    padding: 10px 12px;
  }
  .hero-copy h1 {
    font-size: 26px;
  }
  .hot-strip {
    padding: 10px 0 2px;
  }
  .hot-item {
    width: 70px;
    height: 70px;
    border-radius: 24px;
  }
  .hot-viewport {
    padding: 10px 10px;
    border-radius: 18px;
  }
  .hot-track {
    gap: 12px;
  }
  .home-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-ad-card {
    min-height: 112px;
  }
  .home-ad--inline .home-ad-card {
    min-height: 150px;
  }
  .game-hero {
    grid-template-columns: 92px 1fr;
  }
  .game-logo {
    width: 92px;
    height: 92px;
    border-radius: 20px;
  }
  .game-title {
    font-size: 22px;
  }
  .spec-row {
    grid-template-columns: 110px 1fr;
  }
  .sidebar-box--sticky {
    position: static;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  .gallery img {
    width: clamp(260px, 82vw, 420px);
  }
  .ad-inline--banner .ad-strip {
    min-height: 100px;
  }
  .about-head h2 {
    font-size: 22px;
  }
  .about-toggle {
    width: 100%;
  }
  .get-head h2 {
    font-size: 22px;
  }
  .get-safety {
    border-radius: 22px;
    align-items: flex-start;
  }
  .get-actions {
    grid-template-columns: 1fr;
  }
  .search-inline input {
    width: 100%;
  }
  .footer-nav {
    gap: 16px;
  }

  .type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .type-grid--hot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .type-grid--main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Larger icons on mobile */
  .type-game img {
    border-radius: 34px;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card {
    transition: none;
  }
  .btn:hover,
  .card:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .nav-drawer .search.search--drawer {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }
  .nav-drawer .search.search--drawer input {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .nav-drawer .search.search--drawer .btn {
    width: auto;
    white-space: nowrap;
  }
}
@media (max-width: 425px) {
  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
  }
}

@media (max-width: 768px) {
  .type-grid {
    gap: 12px;
  }
  .type-game-name {
    font-size: 14px;
    line-height: 1.25;
  }

  .card-body {
    padding: 12px 12px 14px;
  }

  .page-game .game-hero {
    padding: 12px;
  }
}

@media (max-width: 425px) {
  .load-more-wrap {
    justify-content: stretch;
    margin: 14px 0 10px;
  }
  .load-more-wrap .btn {
    width: 100%;
  }

  .type-game {
    grid-template-columns: 1fr;
  }
  .type-game img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 34px;
  }
  .type-game-name {
    font-size: 14px;
  }

  .hot-inner {
    gap: 8px;
  }

  .page-game .game-hero {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }
  .page-game .game-logo {
    width: 88px;
    height: 88px;
    border-radius: 18px;
  }
  .page-game .game-title {
    font-size: 22px;
    line-height: 1.15;
  }
  .page-game .spec-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .spec-v,
  .prose,
  .footer-lead {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 375px) {
  .type-game {
    grid-template-columns: 1fr;
  }
  .type-game img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 32px;
  }
  .type-game-name {
    font-size: 13.5px;
  }

  .page-game .spec-row {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (max-width: 320px) {
  .type-game {
    grid-template-columns: 1fr;
  }
  .type-game img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
  }
  .type-game-name {
    font-size: 13px;
  }

  .page-game .game-hero {
    grid-template-columns: 1fr;
  }
  .page-game .game-hero-media {
    display: flex;
    justify-content: center;
  }
  .page-game .game-logo {
    width: 92px;
    height: 92px;
  }
  .page-game .spec-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

@media (max-width: 425px) {
  .actions {
    gap: 10px;
  }
  .actions .btn {
    width: 100%;
  }

  .header-searchbar {
    height: 44px;
  }

  .btn-store {
    height: 56px;
  }
  .btn-store span {
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }
}

@media (max-width: 320px) {
  .section {
    padding: 16px 0;
  }
  .footer-top {
    padding: 8px 0 6px;
  }

  .game-title,
  .page-title h1 {
    overflow-wrap: anywhere;
  }
}

/* --- Mobile overflow guard (<= 768px) --- */
@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .container {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .hot-viewport,
  .gallery {
    overscroll-behavior-x: contain;
  }
  .game-top-layout,
  .game-after {
    min-width: 0;
    overflow: hidden;
  }
  .page-game main.container {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-game .game-top-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .page-game .game-hero {
    width: 100%;
    max-width: 100%;
    grid-column: auto;
    grid-row: auto;
  }
  .page-game .ad-card.ad-top {
    order: 2;
    width: 100%;
    max-width: 100%;
    grid-column: auto;
    grid-row: auto;
  }
  .page-game .game-similar {
    order: 3;
    width: 100%;
    max-width: 100%;
    position: static;
    align-self: start;
    grid-column: auto;
    grid-row: auto;
  }
  .page-game .spec-row {
    grid-template-columns: minmax(104px, 45%) 1fr;
    align-items: center;
  }
  .page-game .spec-v {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .page-game .strip-row--wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    padding: 10px 4px 4px;
  }
  .page-game .strip-game {
    width: 100%;
  }
  .page-game .strip-game img {
    border-radius: 32px;
  }
  .page-game main.container {
    width: 100%;
    max-width: 100%;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .side-row-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 425px) {
  .page-game main.container.section {
    padding-top: 14px;
  }

  .spec-card {
    padding: 12px;
  }
  .spec-k {
    white-space: nowrap;
  }
  .spec-v {
    min-width: 0;
  }

  .rating-pill {
    white-space: normal;
  }
  .game-meta {
    gap: 8px;
  }
}

@media (max-width: 320px) {
  .page-game .game-hero {
    padding: 12px;
  }
  .page-game .game-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-game .rating-inline {
    align-self: flex-start;
  }
}

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

iframe,
video,
canvas {
  max-width: 100%;
}

.prose,
.spec-v,
.footer-lead {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }
  .header-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .nav-drawer .nav-links {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-drawer .nav-links a {
    min-height: 44px;
  }

  .home-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hot-tile-name {
    font-size: 13px;
  }
}

@media (max-width: 425px) {
  .home-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hot-tile {
    border-radius: 22px;
  }
  .hot-tile-name {
    font-size: 13px;
  }
}

@media (max-width: 320px) {
  .hot-tile-name {
    font-size: 12.5px;
  }
}

@media (width: 1024px) and (height: 866px) {
  .container {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  .page-game {
    --game-title-max: 15;
  }
  .page-game {
    --tw-bg-opacity: 1;
  }

  .page-game .game-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
  }
  .header-actions {
    grid-column: auto;
    justify-content: flex-end;
  }
  .header-searchbar {
    width: 100%;
    max-width: 340px;
  }

  .page-type .type-grid--main {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .page-type .type-grid--hot {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .page-game .game-top-layout {
    grid-template-columns: minmax(0, 360px) minmax(280px, 300px) minmax(
        240px,
        1fr
      );
    gap: 16px;
    align-items: start;
  }
  .page-game .game-hero {
    grid-column: auto;
    grid-row: auto;
  }
  .page-game .ad-card.ad-top {
    grid-column: auto;
    grid-row: auto;
  }
  .page-game .game-similar {
    grid-column: auto;
    grid-row: auto;
  }

  .page-game .game-meta {
    align-items: flex-start;
  }
  .page-game .rating-inline {
    order: 1;
  }
  .page-game .meta-type {
    order: 2;
  }
  .page-game .meta-safe {
    order: 3;
    flex: 0 0 100%;
    margin-top: 6px;
  }

  .page-game .game-hero,
  .page-game .spec-card,
  .page-game .sidebar-box,
  .page-game .side-row,
  .page-game .ad-card,
  .page-game .ad-inline,
  .page-game .info-item,
  .page-game .tag,
  .page-game .rating-pill,
  .page-game .get-safety,
  .page-game .gallery img {
    border: 0 !important;
  }

  .page-game .game-similar {
    position: static;
    padding: 10px;
  }
  .page-game .game-similar .section-head.tight {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }
  .page-game .side-stack {
    gap: 4px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
  }
  .page-game .side-row {
    background-color: rgb(40 41 50 / var(--tw-bg-opacity));
    border-radius: 12px;
    padding: 6px 8px;
    gap: 8px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) max-content;
    align-items: center;
  }
  .page-game .side-row img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .page-game .side-row-title {
    padding: 0;
    border-radius: 0;
    background: transparent;
    margin: 0;
    line-height: 1.2;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page-game .side-row-rate {
    padding: 0;
    border-radius: 0;
    background: transparent;
    margin: 0;
    margin-left: 0;
    justify-self: end;
  }

  .page-game .strip-row--wrap {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    padding: 10px 4px 4px;
  }
  .page-game .strip-game {
    width: auto;
  }

  .home-hot-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-sections-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  }
  .home-sections-layout .sections {
    padding-right: 8px;
  }
  .home-sections-ad {
    margin-top: 0;
    margin-left: 0;
    align-self: stretch;
    display: flex;
    width: 100%;
    max-width: none;
  }
  .home-sections-ad > .ad-card {
    height: 100%;
  }

  .home-sections-layout .section-head {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .home-sections-layout .type-strip .section-head {
    padding-right: 28px;
  }
  .home-sections-layout .section-head h2 {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-sections-layout .section-head .link {
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: flex-start;
  }

  .home-sections-layout .type-strip .strip-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    padding: 10px 4px 4px;
  }
  .home-sections-layout .type-strip .strip-game {
    width: auto;
  }
}

@media (min-width: 1000px) and (max-width: 1040px) and (min-height: 820px) and (max-height: 920px) {
  .page-type {
    --type-page-size: 27;
  }
  .page-type .type-grid--main {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
  .page-type .type-grid--hot {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) and (max-width: 1040px) and (min-height: 820px) and (max-height: 920px) {
  .page-game {
    --game-title-max: 15;
  }
  .page-game {
    --tw-bg-opacity: 1;
  }
}
