/* ============================================================
 * 梗鲸站内适配层（人工维护）——合成大肥鱼（/games/merge）
 * 页面结构：上游 dafish.css（原 styles.css，仅素材路径改造）在前，
 * 本文件在后，靠顺序覆盖做站内适配。link 顺序不能反。
 * 上游来源：https://github.com/Koloyaaa/DaFeiYu （MIT）
 * ============================================================ */

/* ---- 通用隐藏（!important 压过上游任何状态）----
   #result-leaderboard-status：全球排行榜已下线，game.js 结算时会写
   「排行榜尚未连接」类文案，hidden 属性被游戏置 false 后仍需压住；
   #profile-setup-dialog：上游 game.js 启动引用该元素（不能删 DOM），
   仅作占位隐藏。 */
.gj-hidden { display: none !important; }

/* ---- 内联 SVG 图标（替代 FontAwesome CDN）----
   上游 .utility-icon / .screenshot-button-icon 原放 <i class="fa-*">（1em 方形），
   换 SVG 后需显式给尺寸。 */
.utility-icon svg,
.screenshot-button-icon svg { width: 1em; height: 1em; display: block; }

/* 主题按钮图标按 data-theme 显隐（上游靠 JS 切 fa-sun/fa-moon class，本站不引 FA） */
.gj-icon-sun { display: none; }
[data-theme="dark"] .gj-icon-sun { display: block; }
[data-theme="dark"] .gj-icon-moon { display: none; }

/* ---- 广告位（ads.js 注入 iframe）----
   空置时不留白；与游戏区留出间距。 */
#ad-banner-top { margin: 10px auto 0; }
#ad-banner-top:empty { display: none; }

/* ---- 站内页脚导航行（SEO 审计 W8：静态出链，非 JS 死胡同）---- */
.gj-foot-nav {
  margin: 0 0 10px;
  font-size: 0.82rem;
}
.gj-foot-nav a {
  color: var(--accent, #315f89);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 修正上游 .page-footer 的 white-space:nowrap：署名行（© DornGames | 作者链接 |
   All right reserved.）在 ≤480px 溢出视口 55px；允许换行 + 导航行独占一行 */
.page-footer {
  flex-wrap: wrap;
  white-space: normal;
}
.gj-foot-nav {
  flex-basis: 100%;
}

/* ---- 导航坞让位 ----
   上游 .app-shell 是文档流网格（width: min(1320px, calc(100% - 40px)) 居中，
   无 fixed 顶栏、无锁屏），桌面 rail 展开（body padding 64→200px）时随
   width 百分比自动收窄，无需额外处理；仅补移动端底部 dock 安全区，
   防全站导航坞盖住页脚署名。 */
body.gj-has-dock .page-footer {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
