/*
 * FPS JAPAN safe Design System runtime presets.
 *
 * Standard is intentionally a no-op so the approved canonical appearance is
 * preserved after upgrades. Compact and Wide are opt-in, class-scoped presets.
 *
 * This stylesheet is enqueued after the canonical public stylesheets. That
 * cascade position is part of the preset contract: opt-in overrides must not
 * be neutralized by later zero-specificity component rules.
 */

:where(.fpsj-theme.fpsj-design-profile-wide) {
  --fpsj-content-inline:min(920px,calc(100vw - 32px));
  --fpsj-wide-inline:min(1440px,calc(100vw - 32px));
}

:where(.fpsj-theme.fpsj-design-profile-compact) {
  --fpsj-content-inline:min(780px,calc(100vw - 32px));
  --fpsj-wide-inline:min(1240px,calc(100vw - 32px));
}

/*
 * Compact card density
 *
 * The preset increases information density without reducing typography,
 * hiding content, or changing the approved component order. Desktop geometry
 * is compressed by roughly 15–25%; mobile readability rules keep precedence
 * where they explicitly protect touch targets or text.
 */
:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-v4 .fpsj-v3-section) {
  padding-block:2.6rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-access-grid),
:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-game-grid) {
  gap:.5rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-card--access) {
  min-height:94px;
  padding:.72rem .78rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-card--access .fpsj-front-card__label) {
  margin-bottom:.38rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-tool-stage) {
  gap:.72rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-tools .fpsj-v3-tool-card) {
  min-height:282px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-tool-subgrid) {
  margin-top:.55rem;
  gap:.55rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-card--game) {
  min-height:204px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-game-card__visual) {
  height:142px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-game-card__copy) {
  padding:.62rem .72rem .72rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-database-grid) {
  gap:.62rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-database-panel) {
  min-height:414px;
  padding:.78rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-database-panel__head) {
  gap:.58rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-tabs) {
  gap:.28rem;
  margin-bottom:.62rem;
  padding:.24rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-tab) {
  min-height:44px;
  padding:.4rem .5rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-ranking-grid) {
  gap:.48rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-card) {
  min-height:258px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-card__media) {
  height:142px;
  padding:.48rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-device-card__body) {
  padding:.58rem .62rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-showcase) {
  gap:.72rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-featured-grid) {
  gap:.52rem;
  min-height:316px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-featured-main) {
  min-height:316px;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-featured-side) {
  gap:.34rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-compact-post) {
  min-height:88px;
  padding:.3rem .38rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-grid) {
  gap:.48rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-editorial-lane) {
  padding:.62rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-editorial-list) {
  gap:.28rem;
}

:where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-content-footer) {
  padding:.62rem .72rem;
}

:where(.fpsj-theme.fpsj-radius-compact .fpsj-post-card),
:where(.fpsj-theme.fpsj-radius-compact .fpsj-front-card--access),
:where(.fpsj-theme.fpsj-radius-compact .fpsj-front-card--game),
:where(.fpsj-theme.fpsj-radius-compact .fpsj-front-database-panel),
:where(.fpsj-theme.fpsj-radius-compact .is-style-fpsj-panel),
:where(.fpsj-theme.fpsj-radius-compact .is-style-fpsj-glass) {
  border-radius:9px;
}

:where(.fpsj-theme.fpsj-header-density-compact .fpsj-header__inner),
:where(.fpsj-theme.fpsj-header-density-compact .fpsj-header .fpsj-category-menu-header__root),
:where(.fpsj-theme.fpsj-header-density-compact .fpsj-header .fpsj-category-menu-header__trigger) {
  min-height:56px;
}

:where(.fpsj-theme.fpsj-header-density-compact .fpsj-header__logo),
:where(.fpsj-theme.fpsj-header-density-compact .fpsj-header__logo-image) {
  width:32px;
  height:32px;
}

:where(.fpsj-theme.fpsj-brand-name-hidden .fpsj-header__site-name) {
  display:none;
}

@media(max-width:680px) {
  :where(.fpsj-theme.fpsj-design-profile-wide),
  :where(.fpsj-theme.fpsj-design-profile-compact) {
    --fpsj-content-inline:min(100%,calc(100vw - 24px));
    --fpsj-wide-inline:min(100%,calc(100vw - 24px));
  }

  :where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-v4 .fpsj-v3-section) {
    padding-block:2.25rem;
  }

  :where(.fpsj-theme.fpsj-card-density-compact .fpsj-front-card--access) {
    min-height:96px;
  }
}

@media(min-width:681px) {
  :where(.fpsj-theme .fpsj-managed-footer-group.is-desktop-hidden),
  :where(.fpsj-theme .fpsj-managed-footer-item.is-desktop-hidden) {
    display:none!important;
  }
}

@media(max-width:680px) {
  :where(.fpsj-theme .fpsj-managed-footer-group.is-mobile-hidden),
  :where(.fpsj-theme .fpsj-managed-footer-item.is-mobile-hidden) {
    display:none!important;
  }
}
