/* Recommendation artwork, loaded after the theme so the real covers win. */
.feature-cover {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.feature-main .feature-cover { object-position: center 30%; }
.feature-cover-portrait { object-position: center 34%; }
.feature-main::before,
.feature-mini::before { opacity: .12; }
.feature-main::after {
  background: linear-gradient(90deg, #07131ee8 2%, #07131eb8 43%, #07131e2e 76%), linear-gradient(0deg, #07111bd6, transparent 58%);
}
.feature-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, #071716e8 0%, #07171670 58%, #07171626 100%);
}
.feature-stage a:hover .feature-cover { transform: scale(1.035); }

/* Handheld-first density overrides for the game catalog. */
@media (max-width: 760px) {
  .notice { margin: 14px 0 24px; padding: 15px 16px; }
  .notice-heading { margin-bottom: 9px; }
  .notice-list { gap: 0; }
  .notice-list li { min-height: 44px; padding: 7px 2px; gap: 9px; font-size: 13px; line-height: 1.45; }
  .bookmark-button { min-height: 44px; margin-top: 10px; padding: 8px 14px; }

  .catalog-heading { gap: 12px; margin-bottom: 10px; }
  .catalog-title { width: 100%; }
  .catalog-title .eyebrow { margin-bottom: 5px; font-size: 8px; letter-spacing: 1.4px; }
  .catalog-title > div { flex-direction: row; align-items: baseline; gap: 8px; }
  .catalog-title h2 { font-size: 22px; line-height: 1.25; }
  .total-count { padding-left: 8px; font-size: 11px; white-space: nowrap; }
  .search-field { height: 44px; padding-inline: 14px; }
  .search-field input { font-size: 15px; }

  .catalog-toolbar { padding: 12px 0 14px; }
  .filter-rows { gap: 10px; }
  .filter-row { gap: 5px; }
  .filter-label { min-height: 0; font-size: 11px; line-height: 1.2; }
  .version-filters { min-height: 44px; }
  .version-filters button,
  .glass-radio-group button.version-filter { min-height: 44px; padding: 6px 4px; font-size: 13px; }

  .category-filters:not(.version-filters) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d9eeea;
    border-radius: 14px;
    background: #f6fbfa;
  }
  .category-filters:not(.version-filters) button {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
  }
  .catalog-version-note { margin: 0 0 14px; font-size: 11px; line-height: 1.5; }
}

@media (max-width: 390px) {
  .notice { padding: 14px; }
  .catalog-title h2 { font-size: 21px; }
  .category-filters:not(.version-filters) button { font-size: 12px; }
}

/* Keep every mobile navigation target, including QQ support, on one row. */
@media (max-width: 760px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    position: relative;
    width: calc(100% - 20px);
    min-height: 72px;
    gap: 5px;
  }
  .brand { min-width: 0; gap: 6px; justify-self: start; }
  /* Keep the Chinese brand name visible, but omit the secondary English caption. */
  .brand > div { display: block; }
  .brand-mark { width: 29px; height: 34px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand h1 { font-size: 16px; white-space: nowrap; }
  .brand-caption { display: none; }

  .primary-dock {
    position: absolute;
    /* Centre against the full handset viewport, including the scrollbar gutter. */
    left: calc(50% + 8px);
    transform: translateX(-50%);
    margin-left: 0;
    justify-self: center;
    gap: 3px;
    padding: 4px;
    border-radius: 14px !important;
  }
  .primary-dock .dock-item {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 !important;
    border-radius: 10px;
  }
  .primary-dock .dock-item > span:first-child svg { width: 19px; height: 19px; }

  .support-link {
    display: grid;
    grid-column: 3;
    justify-self: end;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0;
    border-radius: 11px;
  }
  .support-link > span:not([data-icon="qq"]) { display: none; }
  .support-link > [data-icon="qq"] svg { width: 22px; height: 25px; }
}

@media (max-width: 350px) {
  .primary-dock { margin-left: 0; }
  /* Preserve the centred navigation on the narrowest phones. */
  .brand > div { display: none; }
}
