/* Shared navigation for portal routes, standalone games and fullscreen controls. */
.gamecat-navigation {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  background: #fff;
  padding-top: max(6px, env(safe-area-inset-top));
  padding-bottom: 6px;
}
.gamecat-navigation a[href="/"],
a.gamecat-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid #116c3d;
  border-radius: 8px;
  background: #137b44;
  color: #fff;
  font: 700 14px/1.4 system-ui, 'Microsoft YaHei', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: normal;
  pointer-events: auto;
  touch-action: manipulation;
}
.gamecat-navigation a[href="/"]:hover,
a.gamecat-home:hover { background: #0c6033; color: #fff; text-decoration: none; }
.gamecat-navigation a[href="/"]:focus-visible,
a.gamecat-home:focus-visible { outline: 3px solid #ffcb45; outline-offset: 3px; }
.gamecat-direct-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline: max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid #dce7df;
  color: #284737;
  font: 14px/1.4 system-ui, 'Microsoft YaHei', sans-serif;
}
.gamecat-embedded .gamecat-direct-navigation { display: none; }
html:fullscreen .gamecat-direct-navigation { display: flex; }
a.gamecat-fullscreen-home { display: none; }
:fullscreen a.gamecat-fullscreen-home,
.fullscreen-fallback a.gamecat-fullscreen-home { display: inline-flex; min-height: 40px; padding: 7px 10px; }
.mission-topline:has(.gamecat-fullscreen-home) { flex-wrap: wrap; gap: 6px; }
.console:fullscreen .gamecat-fullscreen-bar {
  display: flex;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  min-height: 48px;
  padding: 4px 12px;
  background: #fff;
}
.gamecat-fullscreen-bar { display: none; }
.console:fullscreen .screen { max-height: calc(100dvh - 48px); width: min(100vw, calc((100dvh - 48px) * 1.7778)); }
.game-frame:fullscreen .hud .scene-tools { position: relative; }
.game-frame:fullscreen .scene-tools .gamecat-home,
.game-frame.fullscreen-fallback .scene-tools .gamecat-home {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
}
@media (pointer: coarse) {
  .console:fullscreen .screen { max-height: calc(100dvh - 153px); width: min(100vw, calc((100dvh - 153px) * 1.7778)); }
}
@media (max-width: 600px) {
  .game-stage:fullscreen #mode-label { display: none; }
  .game-card:fullscreen .game-header { height: auto; min-height: 76px; flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .game-card:fullscreen .game-actions { margin-left: auto; }
}
