html.gd-wechat-miniapp footer {
  display: none !important;
}

/* The hidden detail dock must not reserve space below the scrollable content. */
html.gd-wechat-miniapp .gd-post-detail .gd-post-scroll {
  bottom: 0;
}

/* Miniapp detail: keep only the back control over the main image. */
@media (max-width: 1023px) {
  html.gd-wechat-miniapp .gd-post-detail .gd-post-scroll { top: 0; }
  html.gd-wechat-miniapp .gd-post-detail .gd-post-search { display: none; }
  html.gd-wechat-miniapp .gd-post-detail .gd-post-header {
    inset: 8px auto auto 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: block;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }
  html.gd-wechat-miniapp .gd-post-detail .gd-post-header > button:first-child {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .8);
  }
}

/* Miniapp store: remove the web navigation and its reserved bottom space. */
html.gd-wechat-miniapp .gd-store-page .gd-store-bottom { display: none; }
html.gd-wechat-miniapp .gd-store-page .gd-store-scroll { bottom: 0; }

html.gd-wechat-miniapp .page-shell {
  min-height: 100vh;
}

html.gd-wechat-miniapp.gd-miniapp-no-ads .home-ad-intro,
html.gd-wechat-miniapp.gd-miniapp-no-ads .home-shop-ads {
  display: none !important;
}

html.gd-wechat-miniapp.gd-miniapp-no-listing .tusou-apply-float {
  display: none !important;
}

html.gd-wechat-miniapp.gd-miniapp-no-ai .topbar nav a[href="/talk"],
html.gd-wechat-miniapp.gd-miniapp-no-api .topbar nav a[href="https://api.guangdan.cn/"],
html.gd-wechat-miniapp.gd-miniapp-no-account .topbar-account {
  display: none !important;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  html.gd-wechat-miniapp body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
